Triangulated irregular network-based coordinate system conversion method and system
By using irregular triangle nets and triangle interpolation algorithms in coordinate system conversion, the problems of poor applicability of large-batch coordinate transformation and uneven error distribution in the prior art are solved, and efficient and accurate coordinate system conversion is achieved.
Patent Information
- Application Number
- CN202411889374.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-27
AI Technical Summary
The existing coordinate system conversion method is not suitable for handling large-scale coordinate transformation, complex calculations and uneven error distribution.
The coordinate system conversion method based on irregular triangle network is adopted. By obtaining the reference point coordinate values in the conversion area, a Delaunay triangle network is established, the local conversion parameters on the edge of the triangle are calculated, and the local conversion parameters at any point are calculated using the triangle interpolation algorithm to perform coordinate system conversion.
It improves the calculation efficiency of coordinate system conversion, reduces errors, is suitable for the conversion of large-scale spatial coordinate data, and supports a wider range of coordinate system conversion scenarios.
Smart Images

Figure CN120047644A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of GIS, and particularly relates to a coordinate system conversion method and system based on an irregular triangular network. Background Art
[0002] In the field of Geographic Information System (GIS), coordinate system conversion is an essential part when dealing with spatial data. With the development of remote sensing, Global Positioning System (GPS), surveying and mapping, and geospatial data analysis technologies, more and more enterprises and institutions need to process and analyze a large amount of spatial data. These data usually come from different sources and may have different coordinate systems, resulting in data interoperability becoming a major challenge. Therefore, it is particularly important to efficiently and accurately convert a large number of coordinate systems.
[0003] Coordinate systems are usually divided into geodetic coordinate systems and projection coordinate systems. The former is based on the shape and gravity field of the earth, and the latter projects three-dimensional points on the earth's surface onto a two-dimensional plane. Traditional coordinate system conversion generally establishes a translation-rotation-scaling model with seven or four parameters and then calculates each point one by one with unified transformation parameters. This not only has a greater difficulty in calculating the inverse parameters and complex conversion calculations, but also the error at the boundary increases rapidly as the conversion range expands, and its applicability is poor when dealing with a large number of coordinate transformations. Summary of the Invention
[0004] In view of this, the present invention proposes a coordinate system conversion method and system based on an irregular triangular network to solve the problem of poor applicability of the existing coordinate system conversion methods when dealing with a large number of coordinate transformations.
[0005] In the first aspect of the present invention, a coordinate system conversion method based on an irregular triangular network is disclosed, and the method includes:
[0006] Obtain the coordinate values of the reference points in the source coordinate system and the target coordinate system within the conversion area respectively;
[0007] Taking the coordinate values of the reference points in the source coordinate system or the target coordinate system as vertices, establish an irregular triangular network according to the Delaunay triangulation rule;
[0008] Calculate the local conversion parameters on the three sides of each triangle in the irregular triangular network;
[0009] Using the local conversion parameters on the three sides of each triangle, calculate the local conversion parameters of any point within each triangle by using the triangle interpolation algorithm;
[0010] According to the local conversion parameters of any point within each triangle, perform the conversion between the source coordinate system and the target coordinate system for the coordinate points within the conversion area.
[0011] Based on the above technical solutions, preferably, the specific steps of using the coordinate values of the reference points in the source coordinate system or the target coordinate system as vertices include:
[0012] For the conversion of vector data, use the coordinate values of the reference points in the source coordinate system as vertices;
[0013] For the conversion of raster data, use the coordinate values of the reference points in the target coordinate system as vertices.
[0014] Based on the above technical solutions, preferably, the specific steps of establishing an irregular triangular network according to the Delaunay triangulation rule include:
[0015] Divide the conversion area into grids so that the number of vertices in each grid is within a preset range;
[0016] For each grid, construct a triangular network using the point-by-point insertion method;
[0017] Merge the triangular networks of adjacent grids to obtain an irregular triangular network.
[0018] Based on the above technical solutions, preferably, the specific steps of merging the triangular networks of adjacent grids include:
[0019] Find the two vertices with the closest distance between the triangular networks of adjacent grids and connect the two vertices;
[0020] Detect the triangles at the boundary and delete the triangles that do not meet the Delaunay triangulation rule;
[0021] Repeat the above process until all the boundary points of the triangular networks of adjacent grids are added to the adjacent triangular networks to complete the merging.
[0022] Based on the above technical solutions, preferably, the formula for calculating the local conversion parameters on the three sides of each triangle in the irregular triangular network is:
[0023]
[0024] Where a and c are the scaling factors in the horizontal and vertical axes directions of the source coordinate system respectively, b and d are the translation distances in the horizontal and vertical axes directions of the source coordinate system respectively; (x 1 , y 1 ), (x 2 , y 2 ) are the vertices P 1 , P 2 in the source coordinate system, (x 1 ′ , y 1 ′ ), (x 2′ , y 2 ′ ) is the vertex corresponding to P in the target coordinate system 1 and P 2 respectively.
[0025] Based on the above technical solutions, preferably, the specific steps of calculating the local transformation parameters of any point within each triangle by using the local transformation parameters on the three sides of each triangle and adopting the triangle interpolation algorithm include:
[0026] Divide the triangle into grids with a preset precision;
[0027] Taking each side of the triangle as the starting point and the incenter of the triangle as the ending point, construct similar triangles within the triangle by drawing auxiliary lines parallel to the sides;
[0028] Based on the side length ratio relationship of the similar triangles, determine the parameter ratio relationship between the local transformation parameters on the auxiliary lines and the local transformation parameters on the sides of the triangle;
[0029] According to the parameter ratio relationship, calculate the local transformation parameters of any auxiliary line parallel to the side within the triangle through the local transformation parameters on the three sides of the triangle;
[0030] Determine the local transformation parameters of each grid within the triangle according to the local transformation parameters on the auxiliary lines. The local transformation parameters within the same grid are the same, and thus obtain the local transformation parameters of any point within the triangle.
[0031] Based on the above technical solutions, preferably, the specific steps of determining the parameter ratio relationship between the local transformation parameters on the auxiliary lines and the local transformation parameters on the sides of the triangle based on the side length ratio relationship of the similar triangles include:
[0032] Suppose that an auxiliary line parallel to one side of the triangle divides the other two sides of the triangle into two segments with a side length ratio of M:N. Then the parameter ratio relationship between the local transformation parameters on the auxiliary line and the local transformation parameters on the side of the triangle is M:(M + N).
[0033] In the second aspect of the present invention, a coordinate system conversion system based on an irregular triangular network is disclosed. The system includes:
[0034] Data acquisition module: used to respectively acquire the coordinate values of the reference points within the conversion area in the source coordinate system and the target coordinate system;
[0035] Triangular network establishment module: used to establish an irregular triangular network according to the Delaunay triangulation rule with the coordinate values of the reference points in the source coordinate system or the target coordinate system as vertices;
[0036] Local parameter calculation module: used to calculate the local transformation parameters on the three sides of each triangle in the irregular triangular network; using the local transformation parameters on the three sides of each triangle, the local transformation parameters of any point within each triangle are calculated by using the triangle interpolation algorithm;
[0037] Coordinate transformation module: used to perform the transformation between the source coordinate system and the target coordinate system on the coordinate points within the transformation area according to the local transformation parameters of any point within each triangle.
[0038] In the third aspect of the present invention, an electronic device is disclosed, including: at least one processor, at least one memory, a communication interface, and a bus;
[0039] Wherein, the processor, the memory, and the communication interface complete the communication with each other through the bus;
[0040] The memory stores program instructions executable by the processor, and the processor calls the program instructions to implement the method as described in the first aspect of the present invention.
[0041] In the fourth aspect of the present invention, a computer-readable storage medium is disclosed, and the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to implement the method as described in the first aspect of the present invention.
[0042] The present invention has the following beneficial effects compared with the prior art:
[0043] 1) The present invention abandons the traditional method of using unified parameters to perform coordinate transformation within the entire area. Instead, an irregular triangular network is first constructed based on each reference point of the control network where the transformation area is located, and then the local transformation parameters of each grid within each triangle are calculated by triangle interpolation. The local transformation parameters are used to expand the applicable range of the transformation model, reduce errors, and avoid misalignment of boundary data.
[0044] 2) The present invention constructs an irregular triangular network through reference points, and a fast interpolation method designed independently is used to calculate the local transformation parameters of each small grid at high speed within the triangular network. Moreover, the grid division accuracy can be reduced to about 10m in size. Therefore, the coordinate transformation within each grid can be approximated as a linear transformation, thereby greatly improving the calculation efficiency and shortening the working cycle, and it can be applied to the coordinate system transformation of a large number of spatial coordinate data.
[0045] 3) The transformation error of the present invention mainly comes from the positions far from the reference points within the triangle, and the error is the smallest on the boundary of the triangle. Therefore, the present invention can effectively reduce the distances from the points within the triangle to each vertex and each side line by adding reference points and dividing the irregular triangular network formed by more and smaller triangles, and can significantly improve the transformation accuracy without changing the algorithm principle.
[0046] 4) In addition to performing conversions between geographic coordinate systems, the present invention can also directly perform conversions between projected coordinate systems without going through the steps of back-projection - conversion - projection, and supports GCJ offset conversion, with wide applicability.
[0047] 5) The transformation algorithm of the present invention can be applied to more transformation scenarios, including transformations under the black box conditions of coordinate systems where the calculation formulas and parameters are unknown. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0049] Figure 1 It is a schematic diagram of a traditional seven-parameter coordinate system conversion model;
[0050] Figure 2 It is a flowchart of a coordinate system conversion method based on an irregular triangular network according to the present invention;
[0051] Figure 3 It is a schematic diagram of merging adjacent triangular networks according to the present invention;
[0052] Figure 4 It is a schematic diagram of the principle of the similar triangle interpolation method according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in combination with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0054] In the prior art, a seven-parameter (three-dimensional) model or a four-parameter (two-dimensional) model is generally used for coordinate system conversion. For example, the seven-parameter coordinate system conversion model is as Figure 1 shown, coordinate system O 1 -X 1 Y 1 Z 1 and coordinate system O 2 -X 2 Y 2 Z 2The seven parameters involved in the three-dimensional transformation are the translations Δx, Δy, and Δz in the three coordinate directions, the three Euler angles ε x , ε y , ε z , and the scale factor k. Let (x, y, z) and (x 2 , y 2 , z 2 ) be the coordinates before and after the transformation respectively. When the three Euler angles are small enough, the transformation matrix of the seven-parameter Bursa model is as follows:
[0055]
[0056] Although this method is currently a common method, there are still the following problems when dealing with a large number of coordinate system transformations:
[0057] 1. Limited scope of application
[0058] The approximate calculation conditions of the four-parameter model and the seven-parameter model limit the processing scope of coordinate system transformation. Under generally acceptable error conditions, the four-parameter model can handle coordinate system transformations within a range of 20 square kilometers, and the seven-parameter model can handle coordinate system transformations within a range of 50 square kilometers.
[0059] 2. Uneven error distribution and misalignment of boundary data
[0060] For both the four-parameter model and the seven-parameter model, the error is smaller closer to the center and larger farther from the center within a single transformation area. Since the scope of application of a single model is limited, when performing transformations over a large area, the error at the boundary between adjacent regions will be very obvious, and contours such as roads and rivers cannot be aligned.
[0061] 3. Complex transformation process and long time consumption
[0062] When using the four-parameter model or the seven-parameter model for coordinate transformation, first, it is necessary to inverse-calculate the four parameters or seven parameters based on 2 - 3 reference points, and the ellipsoid reference system and the central longitude of the calculation area need to be specified. The transformation between geographic coordinate systems can be directly calculated point by point according to unified parameters. If it is a transformation between projected coordinate systems, it is also necessary to first perform an inverse projection calculation on the data, obtain the coordinates in the geographic coordinate system before performing the coordinate system transformation, and finally, the result needs to be projected again to obtain the coordinate values in the final projected coordinate system.
[0063] 4. Difficulty in improving accuracy
[0064] For coordinate system transformations within the same area, without changing the algorithm model, it is impossible to achieve the goal of improving the transformation accuracy and reducing errors by adjusting parameters.
[0065] In view of these problems and difficulties, the present invention proposes a coordinate system conversion method and system based on an irregular triangular network, which can be applied to the coordinate transformation of a large number of geographic information data.
[0066] Please refer to Figure 2 , the present invention discloses a coordinate system conversion method based on an irregular triangular network, and the method includes:
[0067] S1. Obtain the coordinate values of the reference points in the source coordinate system and the target coordinate system within the conversion area respectively.
[0068] In an embodiment of the present invention, first, each reference point of the existing measurement control network within the conversion area is obtained, and the coordinate values of each reference point in the source coordinate system and the target coordinate system are obtained respectively. The reference point is some fixed reference points in the measurement control network, and has coordinate values in two coordinate systems as standards. Generally used as a starting point or to evaluate the error after conversion. The present invention uses the reference point as the starting point for coordinate transformation.
[0069] S2. Using the coordinate values of the reference points in the source coordinate system or the target coordinate system as vertices, establish an irregular triangular network according to the Delaunay triangulation rule.
[0070] In an embodiment of the present invention, each reference point of the existing measurement control network within the conversion area is used to construct an irregular triangular network.
[0071] Specifically, the vector data is converted from the original coordinate system of each point to the target coordinate system. Therefore, for the conversion of vector data, using the coordinate values of the reference points in the source coordinate system as vertices, an irregular triangular network is established according to the Delaunay triangulation rule. However, for the conversion of raster data, finally, the point pixel position of each pixel in the source coordinate system needs to be calculated according to the target coordinate system in order to obtain the respective color values of the points. Therefore, for the conversion of raster data, using the coordinate values of the reference points in the target coordinate system as vertices, an irregular triangular network is established according to the Delaunay triangulation rule.
[0072] Since the time complexity of traditional triangulation algorithms is basically O(n2), which is proportional to the square of the number of vertices n. In order to reduce the computational complexity, the triangulation algorithm of the present invention is optimized.
[0073] Specifically, in an embodiment of the present invention, the establishment of the irregular triangular network according to the Delaunay triangulation rule specifically includes:
[0074] Divide the conversion area into grids so that the number of vertices in each grid is within a preset range. For example, about 2 to 5 vertices are retained in each grid on average.
[0075] For each grid, use the point-by-point insertion method to construct a triangular network;
[0076] Merge the triangular meshes of adjacent grids to obtain an irregular triangular mesh. Due to the characteristics of Delaunay triangulation, only adjacent vertices need to be involved in the calculation when merging adjacent triangular meshes.
[0077] As Figure 3 shown in the schematic diagram of merging adjacent triangular meshes, the specific steps of merging the triangular meshes of adjacent grids are as follows:
[0078] (a) Find the starting line. Find the two vertices with the shortest distance between the triangular meshes of adjacent grids, and connect the two vertices as the starting line. For example Figure 3 in, V 1 ~V 7 on the left is the triangular mesh of one grid, and V 8 ~V 13 on the right is the triangular mesh of its adjacent grid. The connection line between V 4 and V 10 is the starting line.
[0079] (b) Delete non-Delaunay triangles. Detect the triangles at the boundary and delete the triangles that do not meet the Delaunay triangulation rules;
[0080] (c) Reconstruct the triangular mesh. Repeat the above processes (a) and (b) to reconstruct the triangular mesh until all the boundary points of the triangular meshes of adjacent grids are added to the adjacent triangular mesh to complete the merger.
[0081] S3. Calculate the local transformation parameters on the three sides of each triangle in the irregular triangular mesh.
[0082] Using two vertices of a triangle, the local transformation parameters on the connection line of the two vertices can be inversely calculated by using the translation and scaling transformation matrix in the plane rectangular coordinate system, that is, two scaling coefficients and two translation distances. The translation and scaling transformation formula in the plane rectangular coordinate system is:
[0083]
[0084] where a and c are the scaling coefficients in the horizontal and vertical axes directions of the source coordinate system respectively, and b and d are the translation distances in the horizontal and vertical axes directions of the source coordinate system respectively;
[0085] Solving the system of four linear equations corresponding to the above transformation formula, the calculation formula for the local transformation parameters on the three sides of each triangle in the irregular triangular mesh is:
[0086]
[0087] where (x 1 , y 1), (x 2 , y 2 ) is the vertex P in the source coordinate system 1 and P 2 , (x 1 ′ , y 1 ′ ), (x 2 ′ , y 2 ′ ) are the corresponding vertices in the target coordinate system to P 1 and P 2 .
[0088] S4. Using the local transformation parameters on the three sides of each triangle, the local transformation parameters of any point within each triangle are calculated by using the triangle interpolation algorithm.
[0089] Usually, the triangle interpolation mostly adopts the proportional area method or the anti - gravity method, and this algorithm is not conducive to the rapid calculation of each pixel within the triangle. The present invention utilizes the characteristics of similar triangles, constructs similar triangles within the triangle to quickly calculate the local transformation parameters of any point within the triangle according to the side - length ratio, and covers all the pixels within the triangle through a double - loop.
[0090] The principle of the similar - triangle interpolation method of the present invention is as Figure 4 shown. The specific process of calculating the local transformation parameters of any point within each triangle by using the triangle interpolation algorithm is as follows:
[0091] S41. Conduct grid division of the triangle with a preset precision. For example, the grid precision is set to about 10m in size. At such a precision, the transformation within each grid can be approximated as a linear transformation.
[0092] S42. Starting from one side of the triangle and ending at the in - center of the triangle, construct similar triangles within the triangle by drawing auxiliary lines parallel to the side.
[0093] As Figure 4 shown, P 0 , P 1 , P 2 are respectively the three vertices of a triangle. Starting from P 1 P 2 , along the vertical direction of P 1 P 2 with a preset step size, gradually plan the auxiliary line P 1 P 2 'P 1 ' parallel to P 2 ' until P 1 'P 2'Reach the incenter of the triangle, thus constructing a ΔP 0 P 1 P 2 similar to ΔP 0 P 1 'P 2 ', according to the properties of similar triangles, satisfying P 0 P 1 ':P 0 P 1 =P 1 'P 2 ':P 1 P 2 .
[0094] S43. Determine the parameter ratio relationship between the local conversion parameters on the auxiliary line and the local conversion parameters on the side of the triangle based on the side length ratio relationship of similar triangles.
[0095] Specifically, assume that the auxiliary line parallel to one side of the triangle divides the other two sides of the triangle into two segments with a side length ratio of M:N. Then the parameter ratio relationship between the local conversion parameters on the auxiliary line and the local conversion parameters on the side of the triangle is M:(M + N).
[0096] As Figure 4 shown, the dotted line P 1 'P 2 ' is the auxiliary line, and P x is any point on the auxiliary line. Assume that P 0 P 1 ':P 1 'P 1 =M:N. Then P 1 'P 2 ':P 1 P 2 =M:(M + N). The local conversion parameters of any two points on the auxiliary line parallel to the side are the same. The parameter ratio relationship between the local conversion parameters on the auxiliary line and the local conversion parameters on the side of the triangle is the same as the side length ratio relationship of similar triangles. That is, the local conversion parameters a', b', c', d' of any point P x on the auxiliary line and the local conversion parameters a, b, c, d on the side P 1 P 2 of the triangle are in direct proportion. Therefore, the parameter ratio relationship between the local conversion parameters on the auxiliary line P 1 'P 2 ' and the local conversion parameters on the side P 1 P 2 of the triangle is also M:(M + N).
[0097] S44. According to the parameter ratio relationship, calculate the local conversion parameters on the auxiliary line parallel to the side through the local conversion parameters on the three sides of the triangle.
[0098] S45. Repeat the above steps S42 - S44 to construct similar triangles, making the auxiliary line parallel to the side gradually approach the incenter of the triangle, and calculate the local conversion parameters on any auxiliary line parallel to the side within the triangle.
[0099] After calculating the local conversion parameters on the auxiliary line, determine which grids the auxiliary lines fall into, and take the local conversion parameters on the auxiliary lines falling into the grids as the local conversion parameters of the grids. The local conversion parameters within the same grid are the same. In this way, the local conversion parameters of each grid within the triangle can be determined. If multiple auxiliary lines fall into the same grid, take the average value of the local conversion parameters as the local conversion parameter of this grid, and finally obtain the local conversion parameters of any point within the triangle.
[0100] S5. According to the local conversion parameters of any point within each triangle, perform the conversion between the source coordinate system and the target coordinate system for the coordinate points within the conversion area.
[0101] The present invention constructs an irregular triangular network based on multiple measurement reference points within the conversion area, constructs the parameters of the linear transformation of each point through triangular interpolation, calculates the transformed coordinate values through local linear transformation, with high calculation efficiency, small conversion error and uniform distribution. Compared with the traditional coordinate conversion method, the coordinate system conversion method of the present invention has the following advantages:
[0102] 1. The present invention abandons the traditional method of using a set of parameters to perform conversion for the entire area, but first constructs an irregular triangular network TIN based on each reference point of the control network where the conversion area is located, and then calculates the local conversion parameters of each 10m grid within the triangle through triangular interpolation. The conversion parameters in different local areas are different, which can reduce the conversion error.
[0103] 2. Since the calculation grid is reduced to about 10m in size, the conversion within each grid can be approximated as a linear conversion. Therefore, when performing coordinate system conversion for a large number of spatial coordinate data, only a simple and efficient linear conversion actually needs to be performed, greatly improving the calculation efficiency, shortening the working cycle, and the conversion algorithm is simpler and more efficient.
[0104] 3. Since no unified conversion parameters are adopted and the parameters of each local area are calculated, all areas covered by the reference points can be included in the conversion range to complete the coordinate system conversion calculation at one time, and the applicable range has no size limit. When converting geographical information data in a large range (more than 50 square kilometers), the present invention can perform continuous conversion in one task, without the need to divide it into different areas for conversion and then splicing, nor will there be problems such as misalignment of splicing boundaries caused by errors (such as misalignment of roads and rivers).
[0105] 4. When processing a large number of vector data or raster data, the present invention can improve the conversion efficiency and simplify the conversion steps. When converting between projection coordinate systems, there is no need to go through the process of back-projection - conversion - projection, and it can be directly converted in one step.
[0106] 5. Different from the conventional algorithm where the error is inversely proportional to the distance to the center point, the algorithm of the present invention has the highest accuracy at each reference point and each side of the triangle. The conversion error mainly comes from the positions far from the reference points inside the triangle, and the error near the centroid inside the triangle is the largest, but it does not exceed 1 / 12 of the seven-parameter Bursa model. Instead, the error is the smallest at the boundary of the triangle. Therefore, on the basis of not changing the algorithm model, only by increasing the reference points and dividing the irregular triangular mesh formed by more and smaller triangles can the distances from the inside of the triangle to each vertex and each side be effectively reduced, and the conversion accuracy can be improved.
[0107] 6. The transformation algorithm of the present invention can be applied to more transformation scenarios, including transformation under the black box condition of a coordinate system where the calculation formula and parameters are unknown. Under the premise of not knowing the algorithm models of the source coordinate system or the target coordinate system, the conversion can also be carried out by the method of the present invention. For example, it supports the GCJ-02 biasing process for the National 2000 coordinate system or the WGS84 coordinate system.
[0108] In summary, the present invention can convert a large number of past surveying and mapping results into a standard coordinate system to provide high-quality spatial data for more public applications or commercial services.
[0109] Corresponding to the above method embodiments, the present invention also discloses a coordinate system conversion system based on an irregular triangular mesh, and the system includes:
[0110] A data acquisition module: used to respectively acquire the coordinate values of the reference points in the source coordinate system and the target coordinate system within the conversion area;
[0111] A triangular mesh establishment module: used to establish an irregular triangular mesh with the coordinate values of the reference points in the source coordinate system or the target coordinate system as vertices according to the Delaunay triangulation rule;
[0112] Local parameter calculation module: used to calculate the local conversion parameters on the three sides of each triangle in the irregular triangular network; using the local conversion parameters on the three sides of each triangle, the local conversion parameters of any point within each triangle are calculated by using the triangle interpolation algorithm;
[0113] Coordinate conversion module: used to perform conversion between the source coordinate system and the target coordinate system for the coordinate points within the conversion area according to the local conversion parameters of any point within each triangle.
[0114] The above system embodiments and method embodiments correspond one by one. For the brief description of the system embodiments, please refer to the method embodiments.
[0115] The present invention also discloses an electronic device, including: at least one processor, at least one memory, a communication interface, and a bus; wherein, the processor, the memory, and the communication interface complete communication with each other through the bus; the memory stores program instructions executable by the processor, and the processor calls the program instructions to implement the method described above in the present invention.
[0116] The present invention also discloses a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to implement all or part of the steps of the method described in the embodiments of the present invention. The storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory ROM, random access memory RAM, magnetic disks, or optical discs that can store program codes.
[0117] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be distributed to multiple network units. Those of ordinary skill in the art can, without creative efforts, select some or all of the modules according to actual needs to achieve the purpose of the solution of this embodiment.
[0118] The above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A coordinate system conversion method based on irregular triangulated network, characterized in that: The method comprises: Obtain the coordinate values of the reference points in the conversion area in the source coordinate system and the target coordinate system respectively; The coordinate values of the reference points in the source coordinate system or the target coordinate system are used as vertices, and an irregular triangulation network is established according to the Delaunay triangulation rule; Calculating local transformation parameters on three sides of each triangle in the irregular triangulated network; Using the local transformation parameters on the three sides of each triangle, a triangle interpolation algorithm is used to calculate the local transformation parameters of any point in each triangle; According to the local transformation parameters of any point in each triangle, the coordinate points in the transformation area are transformed between the source coordinate system and the target coordinate system.
2. The coordinate system conversion method based on irregular triangulated network according to claim 1, characterized in that: The coordinate value of the reference point in the source coordinate system or the target coordinate system as the vertex specifically includes: For the conversion of vector data, the coordinate value of the reference point in the source coordinate system is used as the vertex; For the conversion of raster data, the coordinate value of the base point in the target coordinate system is used as the vertex.
3. The coordinate system conversion method based on irregular triangulated network according to claim 1, characterized in that: The method of establishing an irregular triangulated network according to the Delaunay triangulation rule specifically includes: Dividing the conversion area into grids so that the number of vertices in each grid is within a preset number range; For each mesh, a triangulated network is constructed using a point-by-point interpolation method; The triangulated networks of adjacent grids are merged to obtain an irregular triangulated network.
4. The coordinate system conversion method based on irregular triangulated network according to claim 3 is characterized in that: The merging of triangulated meshes of adjacent meshes specifically includes: Find the two vertices with the closest distance between the triangulated meshes of adjacent meshes and connect the two vertices; Detect the triangles at the boundary and delete the triangles that do not satisfy the Delaunay triangulation rules; Repeat the above process until all the boundary points of the triangulated networks of adjacent grids are added to the adjacent triangulated networks and the merging is completed.
5. The coordinate system conversion method based on irregular triangulated network according to claim 1, characterized in that: The formula for calculating the local conversion parameters on the three sides of each triangle in the irregular triangulated network is: Among them, a and c are the scaling coefficients of the horizontal and vertical axes of the source coordinate system, b and d are the translation distances of the horizontal and vertical axes of the source coordinate system, (x1, y1) and (x2, y2) are the coordinates of the vertices P1 and P2 in the source coordinate system, (x1 ′ , y1 ′ )、(x2 ′ ,y2 ′ ) are the vertex coordinates corresponding to P1 and P2 in the target coordinate system.
6. The coordinate system conversion method based on irregular triangulated network according to claim 1, characterized in that: The method of using the local conversion parameters on the three sides of each triangle and using a triangle interpolation algorithm to calculate the local conversion parameters of any point in each triangle specifically includes: Divide the triangle into grids with preset accuracy; Using each side of the triangle as the starting point and the center of the triangle as the end point, similar triangles are constructed by drawing auxiliary lines parallel to the sides. Determine the parameter proportional relationship between the local transformation parameters on the auxiliary line and the local transformation parameters on the side of the triangle based on the proportional relationship of the side lengths of similar triangles; According to the parameter ratio, the local conversion parameters on the three sides of the triangle are converted into the local conversion parameters on any auxiliary line parallel to the side in the triangle; The local transformation parameters of each grid in the triangle are determined according to the local transformation parameters on the auxiliary line. The local transformation parameters in the same grid are the same, and the local transformation parameters of any point in the triangle are obtained.
7. The coordinate system conversion method based on irregular triangulated network according to claim 6, characterized in that: The method of determining the parameter ratio relationship between the local conversion parameters on the auxiliary line and the local conversion parameters on the side of the triangle based on the ratio relationship of the side lengths of similar triangles specifically includes: Assume that an auxiliary line parallel to one side of the triangle divides the other two sides of the triangle into two segments with side length ratio of M:N. Then the parameter ratio relationship between the local transformation parameters on the auxiliary line and the local transformation parameters on the side of the triangle is M:(M+N).
8. A coordinate system conversion system based on irregular triangulated network, characterized in that: The system comprises: Data acquisition module: used to obtain the coordinate values of the reference points in the conversion area in the source coordinate system and the target coordinate system respectively; Triangulation network building module: used to establish irregular triangulation network according to Delaunay triangulation rules with the coordinate values of the reference points in the source coordinate system or the target coordinate system as vertices; Local parameter calculation module: used to calculate the local conversion parameters on the three sides of each triangle in the irregular triangulated network; using the local conversion parameters on the three sides of each triangle, a triangle interpolation algorithm is used to calculate the local conversion parameters of any point in each triangle; Coordinate transformation module: used to transform the coordinate points in the transformation area between the source coordinate system and the target coordinate system according to the local transformation parameters of any point in each triangle.
9. An electronic device, characterized in that: include: at least one processor, at least one memory, a communication interface, and a bus; Wherein, the processor, memory, and communication interface communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions enable a computer to implement the method according to any one of claims 1 to 7.