A method and system for analyzing and processing billion-level point cloud data for railway survey and design
Through the fast triangulation algorithm and the specified direction projection algorithm, the problem that traditional algorithms cannot efficiently process billions of point cloud data and extract ground intersection lines is solved, and second-level triangulation and millisecond-level projection are realized, meeting the needs of large-scale real-time design.
Patent Information
- Application Number
- CN202311638944.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-12-01
AI Technical Summary
Traditional triangulation algorithms cannot complete triangulation of point cloud data in seconds, and cannot perform ground intersection extraction in designated directions, making it difficult to adapt to large-scale real-time ground intersection extraction requirements.
The fast triangulation algorithm is used to process point cloud data, record triangle arrays, adjacent triangle arrays and convex hull arrays, and execute projection algorithms in the specified direction in the digital ground model to complete the projection of spatial straight lines at a level of 100 kilometers.
It realizes triangulation of point cloud data in seconds, and completes the specified direction projection of spatial straight lines at 100 kilometers in milliseconds, meeting the needs of large scenes and real-time dynamic optimization design, and improving design efficiency and practicality.
Smart Images

Figure QLYQS_2 
Figure QLYQS_4 
Figure BDA0004584006570000022
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of geographic information processing for railway survey and design, and in particular relates to a method and system for analyzing and processing billion-level point cloud data for railway survey and design. Background Art
[0002] Triangulation refers to the process of decomposing a geometric object in two-dimensional or three-dimensional space into a set of interconnected triangles. Triangulation is widely used in many fields such as computational geometry and graphics, fluid mechanics, geographic information systems and remote sensing, finite element analysis, etc. It provides powerful tools and methods for data analysis, simulation and visualization, and provides solutions to various related problems and optimization designs. In the field of railway design, triangulation can be used to describe the terrain and landforms that the railway line passes through and to establish a digital terrain model, which helps designers better understand the terrain changes and terrain characteristics, and then plan the line and select sites. In recent years, with the continuous increase in the demand for automated and intelligent railway survey and design, in order to achieve large-scale real-time dynamic design and automatic optimization, the software has continuously increased the speed requirements for triangulation, ground line projection, and slope intersection calculation. Traditional triangulation algorithms, such as the triangulation growth algorithm proposed by Green, are limited in efficiency because it takes too long to find the third point; the divide-and-conquer algorithm proposed by Shamos and Hoey is relatively efficient in time, but because of frequent recursive operations, the program consumes a lot of memory, making its space efficiency low; the point-by-point insertion algorithm proposed by Lawson locates the target triangle where the insertion point is located each time a point is inserted, and this process consumes a lot of time, so the time efficiency of the algorithm is relatively low. Traditional ground intersection extraction algorithms (such as grid index method and straight line walking method) have high execution efficiency, but because the index structure they establish is only for the plane dimension, they can only process the extraction of ground intersections in the vertical direction, and cannot extract ground intersections in the direction specified by the user. In summary, traditional algorithms cannot support the second-level modeling of billions of point cloud data, cannot extract ground intersections in the specified direction, and are difficult to adapt to the needs of large-scale real-time ground intersection extraction. For this reason, an algorithm that can complete the triangulation of billions of point clouds in seconds and complete the projection of spatial lines along the specified direction in milliseconds is studied to meet the needs of large-scale scene and real-time dynamic optimization design. Summary of the invention
[0003] In view of the defects of the prior art, the present invention provides a method and system for analyzing and processing billion-level point cloud data for railway survey and design, which is suitable for large-scale terrain data modeling and rapid generation of large-scale ground lines and slope foot lines in railway survey and design. The algorithm is highly efficient and has strong practicality.
[0004] The specific technical solution adopted by the present invention is:
[0005] The first invention purpose of this patent is to provide a method for analyzing and processing billion-level point cloud data for railway survey and design. The billion-level point cloud data analysis and processing refers to completing the triangulation of billion-level point cloud data in seconds and completing the projection of a 100-kilometer-level spatial straight line along a specified direction in milliseconds. The method includes:
[0006] S1. Obtain point cloud data;
[0007] S2. Use a fast triangulation algorithm to process the point cloud data. During the processing, continuously record and update the triangle array tris, the adjacent triangle array halftris and the convex hull array hulls. After the processing, the final triangle array tris, the adjacent triangle array halftris and the convex hull array hulls composed of the point cloud are obtained. Among them, the triangle array tris records the indexes of the triangle vertices after triangulation in the point cloud data in turn, the adjacent triangle array halftris records the indexes of the triangles adjacent to each triangle in the triangle array tris in turn, and the convex hull array hulls records the indexes of the convex hull vertices composed of the point cloud data in turn;
[0008] S3, write the final triangle array tris, the adjacent triangle array halftris and the convex hull array hulls composed of the point cloud to the file specified by the user;
[0009] S4, constructing a digital terrain model using the file specified by the user;
[0010] S5, obtaining the spatial multi-line segment and projection direction specified by the user, and converting the spatial multi-line segment into a straight line segment array;
[0011] S6. According to the projection direction, in the digital terrain model, a projection algorithm is executed on each straight line segment in the straight line segment array to obtain projections of all straight line segments;
[0012] S7. Merge the projections of all straight line segments and output the projection results.
[0013] Preferably, S2 is specifically:
[0014] S2-1, calculate the center point C0 of the rectangular bounding box of the point cloud data;
[0015] S2-2, traverse all points except the center point C0, find the three points closest to the center point C0, and arrange them in a clockwise direction to obtain points P0, P1, and P2 in turn to form an initial triangle, and update the initial convex hull array hulls and triangle array tris;
[0016] S2-3, sorting the point cloud data; calculating the center C1 of the circumscribed circle of the initial triangle, and arranging the point cloud data in ascending order according to the distance from the center C1 of the circumscribed circle;
[0017] S2-4. Create an index array arr, specify the index algorithm, and create a size of Set all elements of the index array arr to empty, specifying point P i The position in the index array arr is:
[0018]
[0019] Where: n is the number of points in the point cloud data, θ represents the distance between the center of the circumscribed circle C1 and point P i The angle between the straight line formed and the positive semi-axis of the x-axis on the xy plane, m represents the corresponding point P i At the index value in the index array arr, point P i The index i in the point cloud is placed in the mth position of the index array arr;
[0020] S2-5. Calculate the index values of the three points closest to the center point C0 and update the index array arr; calculate the m values corresponding to P0, P1, and P2, and put the index values of P0, P1, and P2 in the point cloud data into the corresponding positions of the index array arr;
[0021] S2-6. Calculate the index value of the next point in the index array arr; take the next point P from the point cloud data and calculate the m value m corresponding to point P p ;
[0022] S2-7, forward search for the first non-empty element in the index array arr and obtain the corresponding point; from the m of the index array arr p Start from position and search forward for the first non-empty element j to get the corresponding point P e ;
[0023] S2-8, traverse the convex hull array hulls clockwise, determine the arrangement rules of the convex hull edges and points, and generate a triangle; from point P e Take the convex hull edge e as the starting point and start traversing the convex hull array hulls clockwise, and determine whether the convex hull edge e and point P are arranged in a counterclockwise direction. If so, end the traversal and get the target convex hull edge e p , according to the target convex hull edge e p The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, if not, continue to traverse; the clockwise traversal of the convex hull array hulls means traversing from small to large according to the index, and continuing to traverse from the first position when traversing to the position with the largest index;
[0024] S2-9. Continue to traverse the convex hull array hulls clockwise to determine the convex hull edge e n According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls clockwise to get the next convex hull edge e n , determine the convex hull edge e n Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e n Generate a triangle from the two endpoints of and point P, and adjust the triangle to satisfy the Delaunay rule. If not, end the traversal;
[0025] S2-10. Traverse the convex hull array hulls counterclockwise to determine the convex hull edge e b According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls counterclockwise to get the next convex hull edge e b , determine the convex hull edge e b Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e b The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, and add the target convex hull edge e p Set to convex edge e b If not, the traversal ends, where the counterclockwise traversal of the convex hull array hulls is the opposite of the clockwise traversal in S2-8;
[0026] S2-11. Update the convex hull array hulls, triangle array tris, adjacent triangle array tris, and index array arr; update the convex hull array hulls, triangle array tris, and adjacent triangle array halftris, and calculate the target convex hull edge e p The m value corresponding to the starting point e , respectively connect point P and the target convex hull edge e p The index of the starting point in the point cloud data is put into the index array arr corresponding to the mth p With m e Location;
[0027] S2-12, loop through S2-6 to S2-11 until all points are used and triangles are generated, and then the loop ends. The convex hull array hulls, the triangle array tris, and the adjacent triangle array halftris are output.
[0028] Preferably, S5 is specifically:
[0029] S5-1, obtaining a spatial polyline and a projection direction vector v from a user interaction interface;
[0030] S5-2. Convert the spatial polyline into multiple straight line segments. For the straight line part, directly convert it into straight line segments. For the curve part, divide the curve into multiple straight line segments with the step size specified by the user, and put them into the index array arr in order.
[0031] Preferably, S6 is specifically:
[0032] S6-1, obtain the first straight line segment; obtain the first straight line segment l in the straight line segment array, with the starting point being P s , the end point is P d ;
[0033] S6-2, generate rays according to the starting point and projection direction of the straight line segment; s As the starting point, a ray sl is generated along the specified projection direction v;
[0034] S6-3. Calculate the vertical projection of the starting point of the straight line segment on the xy plane and the corresponding triangle; calculate the starting point P s The vertical projection point P on the xy plane s ', take the triangle where the center of the circumscribed circle C1 is located as the seed triangle T0, and find the vertical projection point P s 'The straight line segment l formed by the center C1 of the circumscribed circle s The intersection with the seed triangle T0 on the xy plane, find the adjacent triangle through the intersection and the adjacent triangle array halftris, and find the adjacent triangle and the line segment l s At the intersection on the xy plane, start looping until you find the vertical projection point P s 'The triangle where the ray sl is located is used as the seed triangle T0' for finding the intersection of the ray sl and the triangulated plane;
[0035] S6-4, calculate the projection point of the starting point of the straight line segment in the triangulation along the specified direction; find the projection vector v' of the projection direction vector v on the xy plane, according to P s ' and v' form a straight line segment sl', find the intersection e of the straight line segment sl' and the seed triangle T0' on the xy plane t ' and the intersection point P t ', calculate the intersection point P t 'The projection point P on the ray sl in the vertical direction t , determine and calculate P s With P t The straight line and P s 'With P t 'The intersection point P of the composed straight lines s ", if there is an intersection, jump to step S6-5, otherwise, through the intersection edge e t' and the adjacent triangle array halftris find the adjacent triangle, find the intersection and intersection point of the adjacent triangle with the line segment sl' on the xy plane, and start the loop until the intersection point P of the ray sl and the triangulation is found s "Until now, P s The triangle where " is located is denoted as T s ", if the intersection point P is not found after traversing to the edge of the convex hull s ", the projection fails and the algorithm ends;
[0036] S6-5, calculate the projection point of the end point of the straight line segment in the triangulation network along the specified direction; replace P in S6-2 s Replace with P d , continue to execute S6-2 to S6-4, and get P d Projection point P in the triangulation network along the v direction d ”;
[0037] S6-6. Calculate the bounded plane S formed by the vector v and the straight line segment l;
[0038] S6-7, calculate the intersection of bounded plane S and triangle network; calculate the intersection of bounded plane S and triangle T s "The intersection of t " and the intersection point P t ”, through the intersection of t " and the adjacent triangle array halftris to find the adjacent triangle, find the intersection of the triangle and the bounded plane S, and continue the loop until P is found d The triangle T d "until;
[0039] S6-8, connect each point to get the projection result; connect P s ", all the intersection points obtained in S6-7, P d The obtained polyline segment lz is the projection of the straight line segment l along the v direction in the triangulation network;
[0040] S6-9, loop through the straight line segment array, execute S6-5 to S6-9, obtain all straight line segment projections; obtain the next straight line segment l in the straight line segment array, and convert P s " is replaced by P d ”,P d is replaced by the end point of the next straight line segment l, with T d " is used as a seed triangle, and steps S6-5 to S6-9 are continued until the projections of all straight line segments are obtained, and the algorithm ends.
[0041] The second invention of this patent is to provide a billion-level point cloud data analysis and processing system for railway survey and design. The billion-level point cloud data analysis and processing refers to completing the triangulation of billion-level point cloud data in seconds and completing the projection of a 100-kilometer-level space straight line along a specified direction in milliseconds. The system includes:
[0042] Data acquisition module: obtain point cloud data;
[0043] Triangulation module: Use fast triangulation algorithm to process point cloud data. During the processing, the triangle array tris, adjacent triangle array halftris and convex hull array hulls are continuously recorded and updated. After the processing, the final triangle array tris, adjacent triangle array halftris and convex hull array hulls composed of point cloud are obtained. The triangle array tris records the index of the triangle vertices in the point cloud data after triangulation in turn, the adjacent triangle array halftris records the index of the triangles adjacent to each triangle in the triangle array tris in turn, and the convex hull array hulls records the index of the convex hull vertices composed of the point cloud data in the point cloud data in turn;
[0044] Write module: write the final triangle array tris, adjacent triangle array halftris and convex hull array hulls composed of point cloud to the file specified by the user;
[0045] Construction module: constructs a digital terrain model using user-specified files;
[0046] Line segment array conversion module: obtains the spatial multi-line segment and projection direction specified by the user, and converts the spatial multi-line segment into a line segment array;
[0047] Projection module: according to the projection direction, in the digital terrain model, executes a projection algorithm on each straight line segment in the straight line segment array to obtain projections of all straight line segments;
[0048] Merge output module: merge the projections of all straight line segments and output the projection results.
[0049] Preferably, the working process of the triangulation module is specifically as follows:
[0050] S2-1, calculate the center point C0 of the rectangular bounding box of the point cloud data;
[0051] S2-2, traverse all points except the center point C0, find the three points closest to the center point C0, and arrange them in a clockwise direction to obtain points P0, P1, and P2 in turn to form an initial triangle, and update the initial convex hull array hulls and triangle array tris;
[0052] S2-3, sorting the point cloud data; calculating the center C1 of the circumscribed circle of the initial triangle, and arranging the point cloud data in ascending order according to the distance from the center C1 of the circumscribed circle;
[0053] S2-4. Create an index array arr, specify the index algorithm, and create a size of Set all elements of the index array arr to empty, specifying point P i The position in the index array arr is:
[0054]
[0055] Where: n is the number of points in the point cloud data, θ represents the distance between the center of the circumscribed circle C1 and point P i The angle between the straight line formed and the positive semi-axis of the x-axis on the xy plane, m represents the corresponding point P i At the index value in the index array arr, put the index i of point P in the point cloud into the mth position of the index array arr;
[0056] S2-5. Calculate the index values of the three points closest to the center point C0 and update the index array arr; calculate the m values corresponding to P0, P1, and P2, and put the index values of P0, P1, and P2 in the point cloud data into the corresponding positions of the index array arr;
[0057] S2-6. Calculate the index value of the next point in the index array arr: Take the next point P from the point cloud data and calculate the m value m corresponding to point P p ;
[0058] S2-7, forward search for the first non-empty element in the index array arr and obtain the corresponding point; from the m of the index array arr p Start from position and search forward for the first non-empty element j to get the corresponding point P e ;
[0059] S2-8, traverse the convex hull array hulls clockwise, determine the arrangement rules of the convex hull edges and points, and generate a triangle; from point P e Take the convex hull edge e as the starting point and start traversing the convex hull array hulls clockwise, and determine whether the convex hull edge e and point P are arranged in a counterclockwise direction. If so, end the traversal and get the target convex hull edge e p , according to the target convex hull edge e p The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, if not, continue to traverse; the clockwise traversal of the convex hull array hulls means traversing from small to large according to the index, and continuing to traverse from the first position when traversing to the position with the largest index;
[0060] S2-9. Continue to traverse the convex hull array hulls clockwise to determine the convex hull edge e n According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls clockwise to get the next convex hull edge e n , determine the convex hull edge e n Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e n Generate a triangle from the two endpoints of and point P, and adjust the triangle to satisfy the Delaunay rule. If not, end the traversal;
[0061] S2-10. Traverse the convex hull array hulls counterclockwise to determine the convex hull edge e b According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls counterclockwise to get the next convex hull edge e b , determine the convex hull edge e b Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e b The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, and add the target convex hull edge e p Set to convex edge e b If not, the traversal ends, where the counterclockwise traversal of the convex hull array hulls is the opposite of the clockwise traversal in S2-8;
[0062] S2-11. Update the convex hull array hulls, triangle array tris, adjacent triangle array tris, and index array arr; update the convex hull array hulls, triangle array tris, and adjacent triangle array halftris, and calculate the target convex hull edge e p The m value corresponding to the starting point e , respectively connect point P and the target convex hull edge e p The index of the starting point in the point cloud data is put into the index array arr corresponding to the mth p With m e Location;
[0063] S2-12, loop through S2-6 to S2-11 until all points are used and triangles are generated, and then the loop ends. The convex hull array hulls, the triangle array tris, and the adjacent triangle array halftris are output.
[0064] Preferably, the working process of the straight line segment array conversion module is specifically as follows:
[0065] S5-1, obtaining a spatial polyline and a projection direction vector v from a user interaction interface;
[0066] S5-2. Convert the spatial polyline into multiple straight line segments. For the straight line part, directly convert it into straight line segments. For the curve part, divide the curve into multiple straight line segments with the step size specified by the user, and put them into the index array arr in order.
[0067] Preferably, the specific working process of the projection module is:
[0068] S6-1, obtain the first straight line segment; obtain the first straight line segment l in the straight line segment array, with the starting point being P s , the end point is P d ;
[0069] S6-2, generate rays according to the starting point and projection direction of the straight line segment; s As the starting point, a ray sl is generated along the specified projection direction v;
[0070] S6-3. Calculate the vertical projection of the starting point of the straight line segment on the xy plane and the corresponding triangle; calculate the starting point P s The vertical projection point P on the xy plane s ', take the triangle where the center of the circumscribed circle C1 is located as the seed triangle T0, and find the vertical projection point P s 'The straight line segment l formed by the center C1 of the circumscribed circle s The intersection with the seed triangle T0 on the xy plane, find the adjacent triangle through the intersection and the adjacent triangle array halftris, and find the adjacent triangle and the line segment l s At the intersection on the xy plane, start looping until you find the vertical projection point P s 'The triangle where the ray sl is located is used as the seed triangle T0' for finding the intersection of the ray sl and the triangulated plane;
[0071] S6-4, calculate the projection point of the starting point of the straight line segment in the triangulation along the specified direction; find the projection vector v' of the projection direction vector v on the xy plane, according to P s ' and v' form a straight line segment sl', find the intersection e of the straight line segment sl' and the seed triangle T0' on the xy plane t ' and the intersection point P t ', calculate the intersection point P t 'The projection point P on the ray sl in the vertical direction t , determine and calculate P s With P t The straight line and P s 'With P t 'The intersection point P of the composed straight lines s ", if there is an intersection, jump to step S6-5, otherwise, through the intersection edge e t' and the adjacent triangle array halftris find the adjacent triangle, find the intersection and intersection point of the adjacent triangle with the line segment sl' on the xy plane, and start the loop until the intersection point P of the ray sl and the triangulation is found s "Until now, P s The triangle where " is located is denoted as T s ", if the intersection point P is not found after traversing to the edge of the convex hull s ", the projection fails and the algorithm ends;
[0072] S6-5, calculate the projection point of the end point of the straight line segment in the triangulation network along the specified direction; replace P in S6-2 s Replace with P d , continue to execute S6-2 to S6-4, and get P d Projection point P in the triangulation network along the v direction d ”;
[0073] S6-6. Calculate the bounded plane S formed by the vector v and the straight line segment l;
[0074] S6-7, calculate the intersection of bounded plane S and triangle network; calculate the intersection of bounded plane S and triangle T s "The intersection of t " and the intersection point P t ”, through the intersection of t " and the adjacent triangle array halftris to find the adjacent triangle, find the intersection of the triangle and the bounded plane S, and continue the loop until P is found d The triangle T d "until;
[0075] S6-8, connect each point to get the projection result; connect P s ", all the intersection points obtained in S6-7, P d The obtained polyline segment lz is the projection of the straight line segment l along the v direction in the triangulation network;
[0076] S6-9, loop through the straight line segment array, execute S6-5 to S6-9, obtain all straight line segment projections; obtain the next straight line segment l in the straight line segment array, and convert P s " is replaced by P d ”,P d is replaced by the end point of the next straight line segment l, with T d " is used as a seed triangle, and steps S6-5 to S6-9 are continued until the projections of all straight line segments are obtained, and the algorithm ends.
[0077] The third invention objective of this patent is to provide a computer program that implements the above-mentioned billion-level point cloud data analysis and processing method for railway survey and design.
[0078] The fourth invention objective of this patent is to provide an information data processing terminal that implements the above-mentioned billion-level point cloud data analysis and processing method for railway survey and design.
[0079] The fifth invention objective of this patent is to provide a computer-readable storage medium, including instructions, which, when run on a computer, enables the computer to execute the above-mentioned billion-level point cloud data analysis and processing method for railway survey and design.
[0080] The advantages and positive effects of the present invention are:
[0081] By adopting the above technical solution, the present invention has the following technical effects:
[0082] The present invention can be used to describe the topography and landforms that a railway line passes through and to establish a digital terrain model. The method has concise steps and rigorous logic, and can be quickly implemented with the aid of computer programming. It can quickly process point cloud data sets of billions, and the algorithm has high execution efficiency. In the field of railway survey and design, it can meet the needs of large-scale line planning, slope foot line extraction, and real-time dynamic optimization design of cross sections and longitudinal sections. It can greatly improve design efficiency, has strong practicality and high versatility, and has high promotion and application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 A flowchart of a preferred embodiment of the present invention;
[0084] Figure 2 This is a flow chart of S2 in the preferred embodiment of the present invention;
[0085] Figure 3 This is a flow chart of S5 in the preferred embodiment of the present invention;
[0086] Figure 4 This is a flow chart of S6 in the figure of the preferred embodiment of the present invention. DETAILED DESCRIPTION
[0087] In order to further understand the content, features and effects of the present invention, the following embodiments are given as examples and described in detail with reference to the accompanying drawings.
[0088] The structure of the present invention is described in detail below in conjunction with the accompanying drawings.
[0089] See also Figures 1 to 4 .
[0090] A method for analyzing and processing billion-level point cloud data for railway survey and design, comprising:
[0091] S1. Obtain point cloud data;
[0092] Point cloud data is obtained by selecting point cloud through the user interaction interface and reading data from external files.
[0093] S2. Execute the fast triangulation algorithm to obtain the final triangle array tris, the adjacent triangle array halftris and the convex hull array hulls composed of the point cloud; specifically:
[0094] According to the point cloud data input by the user, during the processing, the triangle array tris, adjacent triangle array halftris and convex hull array hulls are continuously recorded and updated. After the processing, the final triangle array tris, adjacent triangle array halftris and convex hull array hulls composed of the point cloud are obtained. The triangle array tris records the index of the vertices of the triangles after the segmentation in the point cloud data in turn, the adjacent triangle array halftris records the index of the triangles adjacent to each triangle in the triangle array tris in turn, and the convex hull array hulls records the index of the vertices of the convex hull of the point cloud data in the point cloud data in turn;
[0095] The specific steps include:
[0096] S2-1, calculate the center point C0 of the rectangular bounding box of the point cloud data;
[0097] S2-2, traverse all points except the center point C0, find the three points closest to the center point C0, and arrange them in a clockwise direction to obtain points P0, P1, and P2 in turn to form an initial triangle, and update the initial convex hull array hulls and triangle array tris;
[0098] S2-3, sorting the point cloud data; calculating the center C1 of the circumscribed circle of the initial triangle, and arranging the point cloud data in ascending order according to the distance from the center C1 of the circumscribed circle;
[0099] S2-4. Create an index array arr, specify the index algorithm, and create a size of Set all elements of the index array arr to empty, specifying point P i The position in the index array arr is:
[0100]
[0101] Where: n is the number of points in the point cloud data, θ represents the distance between the center of the circumscribed circle C1 and point P i The angle between the straight line formed and the positive semi-axis of the x-axis on the xy plane, m represents the corresponding point P i At the index value in the index array arr, point P i The index in the point cloud is placed in the mth position of the index array arr;
[0102] S2-5. Calculate the index values of the three points closest to the center point C0 and update the index array arr; calculate the m values corresponding to P0, P1, and P2, and put the index values of P0, P1, and P2 in the point cloud data into the corresponding positions of the index array arr;
[0103] S2-6. Calculate the index value of the next point in the index array arr; take the next point P from the point cloud data and calculate the m value m corresponding to point P p ;
[0104] S2-7, forward search for the first non-empty element in the index array arr and obtain the corresponding point; from the m of the index array arr p Start from position and search forward for the first non-empty element j to get the corresponding point P e ;
[0105] S2-8, traverse the convex hull array hulls clockwise, determine the arrangement rules of the convex hull edges and points, and generate a triangle; from point P e Take the convex hull edge e as the starting point and start traversing the convex hull array hulls clockwise, and determine whether the convex hull edge e and point P are arranged in a counterclockwise direction. If so, end the traversal and get the target convex hull edge e p , according to the target convex hull edge e p The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, if not, continue to traverse; the clockwise traversal of the convex hull array hulls means traversing from small to large according to the index, and continuing to traverse from the first position when traversing to the position with the largest index;
[0106] S2-9. Continue to traverse the convex hull array hulls clockwise to determine the convex hull edge e n According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls clockwise to get the next convex hull edge e n , determine the convex hull edge e n Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e n Generate a triangle from the two endpoints of and point P, and adjust the triangle to satisfy the Delaunay rule. If not, end the traversal;
[0107] S2-10. Traverse the convex hull array hulls counterclockwise to determine the convex hull edge e b According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls counterclockwise to obtain the convex hull edge e b And determine the convex hull edge e b Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge eb The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, and add the target convex hull edge e p Set to convex edge e b If not, the traversal ends, where the counterclockwise traversal of the convex hull array hulls is the opposite of the clockwise traversal in S2-8;
[0108] S2-11. Update the convex hull array hulls, triangle array tris, adjacent triangle array tris, and index array arr; update the convex hull array hulls, triangle array tris, and adjacent triangle array halftris, and calculate the target convex hull edge e p The m value corresponding to the starting point e , respectively connect point P and the target convex hull edge e p The index of the starting point in the point cloud data is put into the index array arr corresponding to the mth p With m e Location;
[0109] S2-12, loop through S2-6 to S2-11 until all points are used and triangles are generated, and then the loop ends. The convex hull array hulls, the triangle array tris, and the adjacent triangle array halftris are output.
[0110] S3, write the final triangle array tris, the adjacent triangle array halftris and the convex hull array hulls composed of the point cloud to a file specified by the user, which can be located in a local storage location or a remote storage location, and can be compressed before writing;
[0111] S4, constructing a digital terrain model using the file specified by the user;
[0112] Decompress (if S3 is not compressed, the decompression step can be omitted) and load the file data containing the triangulation results to generate a digital terrain model in memory;
[0113] S5, obtaining the spatial multi-line segment and projection direction specified by the user, and converting the spatial multi-line segment into a straight line segment array;
[0114] The specific steps include:
[0115] S5-1, obtaining a spatial polyline and a projection direction vector v from a user interaction interface;
[0116] S5-2. Convert the spatial polyline into multiple straight line segments. For the straight line part, directly convert it into straight line segments. For the curve part, divide the curve into multiple straight line segments with the step size specified by the user, and put them into the index array arr in order.
[0117] S6, executing the projection algorithm in the specified direction;
[0118] According to the projection direction, in the digital terrain model, a projection algorithm is executed on each straight line segment in the straight line segment array to obtain projections of all straight line segments;
[0119] The specific steps include:
[0120] S6-1, obtain the first straight line segment; obtain the first straight line segment l in the straight line segment array, with the starting point being P s , the end point is P d ;
[0121] S6-2, generate rays according to the starting point and projection direction of the straight line segment; s As the starting point, a ray sl is generated along the specified projection direction v;
[0122] S6-3. Calculate the vertical projection of the starting point of the straight line segment on the xy plane and the corresponding triangle; calculate the starting point P s The vertical projection point P on the xy plane s ', take the triangle where the center of the circumscribed circle C1 is located as the seed triangle T0, and find the vertical projection point P s 'The straight line segment l formed by the center C1 of the circumscribed circle s The intersection with the seed triangle T0 on the xy plane, find the adjacent triangle through the intersection and the adjacent triangle array halftris, and find the adjacent triangle and the line segment l s At the intersection on the xy plane, start looping until you find the vertical projection point P s 'The triangle where the ray sl is located is used as the seed triangle T0' for finding the intersection of the ray sl and the triangulated plane;
[0123] S6-4, calculate the projection point of the starting point of the straight line segment in the triangulation along the specified direction; find the projection vector v' of the projection direction vector v on the xy plane, according to P s ' and v' form a straight line segment sl', find the intersection e of the straight line segment sl' and the seed triangle T0' on the xy plane t ' and the intersection point P t ', calculate the intersection point P t 'The projection point P on the ray sl in the vertical direction t , determine and calculate P s With P t The straight line and P s 'With P t 'The intersection point P of the composed straight lines s ", if there is an intersection, jump to step S6-5, otherwise, through the intersection edge e t' and the adjacent triangle array halftris find the adjacent triangle, find the intersection and intersection point of the adjacent triangle with the line segment sl' on the xy plane, and start the loop until the intersection point P of the ray sl and the triangulation is found s "Until now, P s The triangle where " is located is denoted as T s ", if the intersection point P is not found after traversing to the edge of the convex hull s ", the projection fails and the algorithm ends;
[0124] S6-5, calculate the projection point of the end point of the straight line segment in the triangulation network along the specified direction; replace P in S6-2 s Replace with P d , continue to execute S6-2 to S6-4, and get P d Projection point P in the triangulation network along the v direction d ”;
[0125] S6-6. Calculate the bounded plane S formed by the vector v and the straight line segment l;
[0126] S6-7, calculate the intersection points of the straight line segment formed by the projection points of the starting and ending points of the straight line segment in the triangulation network and all triangles; calculate the intersection points of the bounded plane S and the triangle T s "The intersection of t " and the intersection point P t ”, through the intersection of t " and the adjacent triangle array halftris to find the adjacent triangle, find the intersection of the triangle and the bounded plane S, and continue the loop until P is found d The triangle T d "until;
[0127] S6-8, connect each point to get the projection result. Connect P s ", all the intersection points obtained in S6-7, P d The obtained polyline segment lz is the projection of the straight line segment l along the v direction in the triangulation network;
[0128] S6-9, loop through the straight line segment array, execute S6-5 to S6-9, obtain all straight line segment projections; obtain the next straight line segment l in the straight line segment array, and convert P s " is replaced by P d ”,P d is replaced by the end point of the next straight line segment l, with T d " is used as a seed triangle, and steps S6-5 to S6-9 are continued until the projections of all straight line segments are obtained, and the algorithm ends.
[0129] S7, merging the projections of all straight line segments and outputting the projection results;
[0130] Connect the projected straight line segments into a polyline in the projection order and output the polyline.
[0131] A billion-level point cloud data analysis and processing system for railway survey and design, comprising:
[0132] Data acquisition module: reads the point cloud data input by the user.
[0133] Point cloud data is obtained by selecting point cloud through the user interaction interface and reading data from external files.
[0134] Triangulation module: executes fast triangulation algorithm to obtain convex hull array hulls, triangle array tris, and adjacent triangle array tris.
[0135] According to the point cloud data input by the user, the triangulation algorithm is executed. During the processing, the triangle array tris, the adjacent triangle array halftris and the convex hull array hulls are continuously recorded and updated. After the processing, the final triangle array tris, the adjacent triangle array halftris and the convex hull array hulls composed of the point cloud are obtained. The triangle array tris records the index of the triangle vertices after triangulation in the point cloud data in turn, the adjacent triangle array halftris records the index of the triangles adjacent to each triangle in the triangle array tris in turn, and the convex hull array hulls records the index of the convex hull vertices composed of the point cloud data in the point cloud data in turn;
[0136] The specific steps include:
[0137] S2-1, calculate the center point C0 of the rectangular bounding box of the point cloud data;
[0138] S2-2, traverse all points except the center point C0, find the three points closest to the center point C0, and arrange them in a clockwise direction to obtain points P0, P1, and P2 in turn to form an initial triangle, and update the initial convex hull array hulls and triangle array tris;
[0139] S2-3, sorting the point cloud data; calculating the center C1 of the circumscribed circle of the initial triangle, and arranging the point cloud data in ascending order according to the distance from the center C1 of the circumscribed circle;
[0140] S2-4. Create an index array arr, specify the index algorithm, and create a size of Set all elements of the index array arr to empty, specifying point P i The position in the index array arr is:
[0141]
[0142] Where: n is the number of points in the point cloud data, θ represents the distance between the center of the circumscribed circle C1 and point P i The angle between the straight line formed and the positive semi-axis of the x-axis on the xy plane, m represents the corresponding point P i At the index value in the index array arr, put the index i of point P in the point cloud into the mth position of the index array arr;
[0143] S2-5. Calculate the index values of the three points closest to the center point C0 and update the index array arr; calculate the m values corresponding to P0, P1, and P2, and put the index values of P0, P1, and P2 in the point cloud data into the corresponding positions of the index array arr;
[0144] S2-6. Calculate the index value of the next point in the index array arr; take the next point P from the point cloud data and calculate the m value m corresponding to point P p ;
[0145] S2-7, forward search for the first non-empty element in the index array arr and obtain the corresponding point; from the m of the index array arr p Start from position and search forward for the first non-empty element j to get the corresponding point P e ;
[0146] S2-8, traverse the convex hull array hulls clockwise, determine the arrangement rules of the convex hull edges and points, and generate a triangle; from point P e Take the convex hull edge e as the starting point and start traversing the convex hull array hulls clockwise, and determine whether the convex hull edge e and point P are arranged in a counterclockwise direction. If so, end the traversal and get the target convex hull edge e p , according to the target convex hull edge e p The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, if not, continue to traverse; the clockwise traversal of the convex hull array hulls means traversing from small to large according to the index, and continuing to traverse from the first position when traversing to the position with the largest index;
[0147] S2-9. Continue to traverse the convex hull array hulls clockwise to determine the convex hull edge e n According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls clockwise to get the next convex hull edge e n , determine the convex hull edge e n Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e n Generate a triangle from the two endpoints of and point P, and adjust the triangle to satisfy the Delaunay rule. If not, end the traversal;
[0148] S2-10. Traverse the convex hull array hulls counterclockwise to determine the convex hull edge e b According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls counterclockwise to get the next convex hull edge e b , determine the convex hull edge e b Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e b The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, and add the target convex hull edge e p Set to convex edge e b If not, the traversal ends, where the counterclockwise traversal of the convex hull array hulls is the opposite of the clockwise traversal in S2-8;
[0149] S2-11. Update the convex hull array hulls, triangle array tris, adjacent triangle array tris, and index array arr; update the convex hull array hulls, triangle array tris, and adjacent triangle array halftris, and calculate the target convex hull edge e p The m value corresponding to the starting point e , respectively connect point P and the target convex hull edge e p The index of the starting point in the point cloud data is put into the index array arr corresponding to the mth p With m e Location;
[0150] S2-12, loop through S2-6 to S2-11 until all points are used and triangles are generated, and then the loop ends. The convex hull array hulls, the triangle array tris, and the adjacent triangle array halftris are output.
[0151] Write module: write the final triangle array tris, adjacent triangle array halftris and convex hull array hulls composed of point cloud to the file specified by the user. The file can be located in a local storage location or a remote storage location, and can be compressed before writing;
[0152] Building module: Load the execution results in the write module into the memory and build the digital terrain model in the memory.
[0153] Decompress (if not compressed in the building module, the decompression step can be omitted) and load the file data containing the triangulation results to generate a digital ground model in memory.
[0154] Line segment array conversion module: obtains the spatial polyline segment and projection direction specified by the user, and converts the spatial polyline segment into a line segment array.
[0155] The specific steps include:
[0156] S5-1. Obtain the spatial polyline and projection direction vector v from the user interaction interface.
[0157] S5-2. Convert the spatial polyline into multiple straight line segments. For the straight line part, directly convert it into straight line segments. For the curve part, divide the curve into multiple straight line segments with the step size specified by the user, and put them into the index array arr in order.
[0158] Projection module: executes the projection algorithm in the specified direction.
[0159] According to the projection direction, in the digital terrain model, a projection algorithm is executed on each straight line segment in the straight line segment array to obtain projections of all straight line segments;
[0160] The specific steps include:
[0161] S6-1, obtain the first straight line segment; obtain the first straight line segment l in the straight line segment array, with the starting point being P s , the end point is P d ;
[0162] S6-2, generate rays according to the starting point and projection direction of the straight line segment; s As the starting point, a ray sl is generated along the specified projection direction v;
[0163] S6-3. Calculate the vertical projection of the starting point of the straight line segment on the xy plane and the corresponding triangle; calculate the starting point P s The vertical projection point P on the xy plane s ', take the triangle where the center of the circumscribed circle C1 is located as the seed triangle T0, and find the vertical projection point P s 'The straight line segment l formed by the center C1 of the circumscribed circle s The intersection with the seed triangle T0 on the xy plane, find the adjacent triangle through the intersection and the adjacent triangle array halftris, and find the adjacent triangle and the line segment l s At the intersection on the xy plane, start looping until you find the vertical projection point P s 'The triangle where the ray sl is located is used as the seed triangle T0' for finding the intersection of the ray sl and the triangulated plane;
[0164] S6-4, calculate the projection point of the starting point of the straight line segment in the triangulation along the specified direction; find the projection vector v' of the projection direction vector v on the xy plane, according to P s ' and v' form a straight line segment sl', find the intersection e of the straight line segment sl' and the seed triangle T0' on the xy plane t ' and the intersection point P t ', calculate the intersection point P t'The projection point P on the ray sl in the vertical direction t , determine and calculate P s With P t The straight line and P s 'With P t 'The intersection point P of the composed straight lines s ", if there is an intersection, jump to step S6-5, otherwise, through the intersection edge e t ' and the adjacent triangle array halftris find the adjacent triangle, find the intersection and intersection point of the adjacent triangle with the line segment sl' on the xy plane, and start the loop until the intersection point P of the ray sl and the triangulation is found s "Until now, P s The triangle where " is located is denoted as T s ", if the intersection point P is not found after traversing to the edge of the convex hull s ", the projection fails and the algorithm ends;
[0165] S6-5, calculate the projection point of the end point of the straight line segment in the triangulation network along the specified direction; replace P in S6-2 s Replace with P d , continue to execute S6-2 to S6-4, and get P d Projection point P in the triangulation network along the v direction d ”;
[0166] S6-6. Calculate the bounded plane S formed by the vector v and the straight line segment l;
[0167] S6-7, calculate the intersection points of the straight line segment formed by the projection points of the starting and ending points of the straight line segment in the triangulation network and all triangles; calculate the intersection points of the bounded plane S and the triangle T s "The intersection of t " and the intersection point P t ”, through the intersection of t " and the adjacent triangle array halftris to find the adjacent triangle, find the intersection of the triangle and the bounded plane S, and continue the loop until P is found d The triangle T d "until;
[0168] S6-8, connect each point to get the projection result; connect P s ", all the intersection points obtained in S6-7, P d The obtained polyline segment lz is the projection of the straight line segment l along the v direction in the triangulation network;
[0169] S6-9, loop through the straight line segment array, execute S6-5 to S6-9, obtain all straight line segment projections; obtain the next straight line segment l in the straight line segment array, and convert P s " is replaced by P d”,P d is replaced by the end point of the next straight line segment l, with T d " is used as a seed triangle, and steps S6-5 to S6-9 are continued until the projections of all straight line segments are obtained, and the algorithm ends.
[0170] Merge output module: merge multiple projection line segments and output the projection results.
[0171] Connect the projected straight line segments into a polyline in the projection order and output the polyline.
[0172] A computer program for implementing the method for analyzing and processing billion-level point cloud data for railway survey and design in the above preferred embodiment.
[0173] An information data processing terminal that implements the billion-level point cloud data analysis and processing method for railway survey and design in the above preferred embodiment.
[0174] A computer-readable storage medium includes instructions, which, when executed on a computer, enables the computer to execute the method for analyzing and processing billion-level point cloud data for railway survey and design in the above preferred embodiment.
[0175] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When the use is implemented in whole or in part in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.
[0176] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are within the scope of the technical solution of the present invention.
Claims
1. A method for analyzing and processing billion-level point cloud data for railway survey and design, characterized in that: The billion-level point cloud data analysis and processing refers to completing the triangulation of billion-level point cloud data in seconds, and completing the projection of a 100-kilometer-level spatial straight line along a specified direction in milliseconds. The method includes: S1. Obtain point cloud data; S2. Use a fast triangulation algorithm to process the point cloud data. During the processing, continuously record and update the triangle array tris, the adjacent triangle array halftris and the convex hull array hulls. After the processing is completed, the final triangle array tris, the adjacent triangle array halftris and the convex hull array hulls composed of the point cloud are obtained. Among them, the triangle array tris records the indexes of the triangle vertices after triangulation in the point cloud data in turn, the adjacent triangle array halftris records the indexes of the triangles adjacent to each triangle in the triangle array tris in turn, and the convex hull array hulls records the indexes of the convex hull vertices composed of the point cloud data in the point cloud data in turn; S3, write the final triangle array tris, the adjacent triangle array halftris and the convex hull array hulls composed of the point cloud to the file specified by the user; S4, constructing a digital terrain model using the file specified by the user; S5, obtaining the spatial multi-line segment and projection direction specified by the user, and converting the spatial multi-line segment into a straight line segment array; S6. According to the projection direction, in the digital terrain model, a projection algorithm is executed on each straight line segment in the straight line segment array to obtain projections of all straight line segments; S7. Merge the projections of all straight line segments and output the projection results.
2. The method for analyzing and processing billion-level point cloud data for railway survey and design according to claim 1, characterized in that: S2 is specifically: S2-1, calculate the center point C0 of the rectangular bounding box of the point cloud data; S2-2, traverse all points except the center point C0, find the three points closest to the center point C0, and arrange them in a clockwise direction to obtain points P0, P1, and P2 in turn to form an initial triangle, and update the initial convex hull array hulls and triangle array tris; S2-3, sorting the point cloud data; calculating the center C1 of the circumscribed circle of the initial triangle, and arranging the point cloud data in ascending order according to the distance from the center C1 of the circumscribed circle; S2-4. Create an index array arr, specify the index algorithm, and create a size of Set all elements of the index array arr to empty, specifying point P i The position in the index array arr is: ; Where: n is the number of points in the point cloud data, θ represents the distance between the center of the circumscribed circle C1 and point P i The angle between the straight line formed and the positive semi-axis of the x-axis on the xy plane, m represents the corresponding point P i At the index value in the index array arr, point P i The index i in the point cloud is placed in the mth position of the index array arr; S2-5. Calculate the index values of the three points closest to the center point C0 and update the index array arr; calculate the m values corresponding to P0, P1, and P2, and put the index values of P0, P1, and P2 in the point cloud data into the corresponding positions of the index array arr; S2-6. Calculate the index value of the next point in the index array arr; take the next point P from the point cloud data and calculate the m value m corresponding to point P p ; S2-7, forward search for the first non-empty element in the index array arr and obtain the corresponding point; from the m of the index array arr p Start from position and search forward for the first non-empty element j to get the corresponding point P e ; S2-8, traverse the convex hull array hulls clockwise, determine the arrangement rules of the convex hull edges and points, and generate a triangle; from point P e Take the convex hull edge e as the starting point and start traversing the convex hull array hulls clockwise, and determine whether the convex hull edge e and point P are arranged in a counterclockwise direction. If so, end the traversal and get the target convex hull edge e p , according to the target convex hull edge e p The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, if not, continue to traverse; the clockwise traversal of the convex hull array hulls means traversing from small to large according to the index, and continuing to traverse from the first position when traversing to the position with the largest index; S2-9. Continue to traverse the convex hull array hulls clockwise to determine the convex hull edge e n According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls clockwise to get the next convex hull edge e n , determine the convex hull edge e n Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e n Generate a triangle from the two endpoints of and point P, and adjust the triangle to satisfy the Delaunay rule. If not, end the traversal; S2-10. Traverse the convex hull array hulls counterclockwise to determine the convex hull edge e b According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls counterclockwise to get the next convex hull edge e b , determine the convex hull edge e b Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e b The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, and add the target convex hull edge e p Set to convex edge e b If not, the traversal ends, where the counterclockwise traversal of the convex hull array hulls is the opposite of the clockwise traversal in S2-8; S2-11. Update the convex hull array hulls, triangle array tris, adjacent triangle array tris, and index array arr; update the convex hull array hulls, triangle array tris, and adjacent triangle array halftris, and calculate the target convex hull edge e p The m value corresponding to the starting point e , respectively connect point P and the target convex hull edge e p The index of the starting point in the point cloud data is put into the index array arr corresponding to the mth p With m e Location; S2-12, loop through S2-6 to S2-11 until all points are used and triangles are generated, and then the loop ends. The convex hull array hulls, the triangle array tris, and the adjacent triangle array halftris are output.
3. The method for analyzing and processing billion-level point cloud data for railway survey and design according to claim 2, characterized in that: S5 is as follows: S5-1, obtaining a spatial polyline and a projection direction vector v from a user interaction interface; S5-2. Convert the spatial polyline into multiple straight line segments. For the straight line part, directly convert it into straight line segments. For the curve part, divide the curve into multiple straight line segments with the step size specified by the user, and put them into the index array arr in order.
4. The method for analyzing and processing billion-level point cloud data for railway survey and design according to claim 3, characterized in that: S6 is specifically: S6-1, obtain the first straight line segment; obtain the first straight line segment l in the straight line segment array, with the starting point being P s , the end point is P d ; S6-2, generate rays according to the starting point and projection direction of the straight line segment; s As the starting point, a ray sl is generated along the specified projection direction v; S6-3. Calculate the vertical projection of the starting point of the straight line segment on the xy plane and the corresponding triangle; calculate the starting point P s The vertical projection point P on the xy plane s ', take the triangle where the center of the circumscribed circle C1 is located as the seed triangle T0, and find the vertical projection point P s 'The straight line segment l formed by the center C1 of the circumscribed circle s The intersection with the seed triangle T0 on the xy plane, find the adjacent triangle through the intersection and the adjacent triangle array halftris, and find the adjacent triangle and the line segment l s At the intersection on the xy plane, start looping until you find the vertical projection point P s 'The triangle where the ray sl is located is used as the seed triangle T0' for finding the intersection of the ray sl and the triangulated plane; S6-4, calculate the projection point of the starting point of the straight line segment in the triangulation along the specified direction; find the projection vector v' of the projection direction vector v on the xy plane, according to P s ' and v' form a straight line segment sl', find the intersection e of the straight line segment sl' and the seed triangle T0' on the xy plane t ' and the intersection point P t ', calculate the intersection point P t 'The projection point P on the ray sl in the vertical direction t , determine and calculate P s With P t The straight line and P s 'With P t 'The intersection point P of the composed straight lines s '', if there is an intersection, jump to step S6-5, otherwise, through the intersection edge e t ' and the adjacent triangle array halftris find the adjacent triangle, find the intersection and intersection point of the adjacent triangle with the line segment sl' on the xy plane, and start the loop until the intersection point P of the ray sl and the triangulation is found s ''Until now, P s The triangle where '' is located is denoted as T s '', if the intersection point P is not found after traversing to the edge of the convex hull s '', projection fails, the algorithm ends; S6-5, calculate the projection point of the end point of the straight line segment in the triangulation network along the specified direction; replace P in S6-2 s Replace with P d , continue to execute S6-2 to S6-4, and get P d Projection point P in the triangulation network along the v direction d ''; S6-6. Calculate the bounded plane S formed by the vector v and the straight line segment l; S6-7, calculate the intersection of the bounded plane S and the triangulated network; Calculate bounded plane S and triangle T s ' ... t '' and the intersection point P t '', through the intersection e t '' and the adjacent triangle array halftris find the adjacent triangle, find the intersection of the triangle and the bounded plane S, and continue the loop until P is found d ''Triangle T d ''until; S6-8, connect each point to get the projection result; connect P s '', all the intersection points obtained in S6-7, P d ''The obtained polyline segment lz is the projection of the straight line segment l along the v direction in the triangulation network; S6-9, loop through the straight line segment array, execute S6-5 to S6-9, obtain all straight line segment projections; obtain the next straight line segment l in the straight line segment array, and convert P s '' is replaced by P d '', P d is replaced by the end point of the next straight line segment l, with T d ''As the seed triangle, continue to execute S6-5 to S6-9 until the projection of all straight line segments is obtained and the algorithm ends.
5. A billion-level point cloud data analysis and processing system for railway survey and design, characterized in that: The analysis and processing of billion-level point cloud data refers to completing the triangulation of billion-level point cloud data in seconds and completing the projection of a 100-kilometer-level spatial straight line along a specified direction in milliseconds. The system includes: Data acquisition module: obtain point cloud data; Triangulation module: Use fast triangulation algorithm to process point cloud data. During the processing, the triangle array tris, adjacent triangle array halftris and convex hull array hulls are continuously recorded and updated. After the processing, the final triangle array tris, adjacent triangle array halftris and convex hull array hulls composed of point cloud are obtained. Among them, the triangle array tris records the index of the triangle vertices in the point cloud data after triangulation in turn, the adjacent triangle array halftris records the index of the triangles adjacent to each triangle in the triangle array tris in turn, and the convex hull array hulls records the index of the convex hull vertices composed of the point cloud data in the point cloud data in turn; Write module: write the final triangle array tris, adjacent triangle array halftris and convex hull array hulls composed of point cloud to the file specified by the user; Construction module: constructs a digital terrain model using user-specified files; Line segment array conversion module: obtains the spatial multi-line segment and projection direction specified by the user, and converts the spatial multi-line segment into a line segment array; Projection module: according to the projection direction, in the digital terrain model, executes a projection algorithm on each straight line segment in the straight line segment array to obtain projections of all straight line segments; Merge output module: merge the projections of all straight line segments and output the projection results.
6. The billion-level point cloud data analysis and processing system for railway survey and design according to claim 5 is characterized in that: The working process of the triangulation module is as follows: S2-1, calculate the center point C0 of the rectangular bounding box of the point cloud data; S2-2, traverse all points except the center point C0, find the three points closest to the center point C0, and arrange them in a clockwise direction to obtain points P0, P1, and P2 in turn to form an initial triangle, and update the initial convex hull array hulls and triangle array tris; S2-3, sorting the point cloud data; calculating the center C1 of the circumscribed circle of the initial triangle, and arranging the point cloud data in ascending order according to the distance from the center C1 of the circumscribed circle; S2-4. Create an index array arr, specify the index algorithm, and create a size of Set all elements of the index array arr to empty, specifying point P i The position in the index array arr is: ; Where: n is the number of points in the point cloud data, θ represents the distance between the center of the circumscribed circle C1 and point P i The angle between the straight line formed and the positive semi-axis of the x-axis on the xy plane, m represents the corresponding point P i At the index value in the index array arr, put the index i of point P in the point cloud into the mth position of the index array arr; S2-5. Calculate the index values of the three points closest to the center point C0 and update the index array arr; calculate the m values corresponding to P0, P1, and P2, and put the index values of P0, P1, and P2 in the point cloud data into the corresponding positions of the index array arr; S2-6. Calculate the index value of the next point in the index array arr: Take the next point P from the point cloud data and calculate the m value m corresponding to point P p ; S2-7, forward search for the first non-empty element in the index array arr and obtain the corresponding point; from the m of the index array arr p Start from position and search forward for the first non-empty element j to get the corresponding point P e ; S2-8, traverse the convex hull array hulls clockwise, determine the arrangement rules of the convex hull edges and points, and generate a triangle; from point P e Take the convex hull edge e as the starting point and start traversing the convex hull array hulls clockwise, and determine whether the convex hull edge e and point P are arranged in a counterclockwise direction. If so, end the traversal and get the target convex hull edge e p , according to the target convex hull edge e p The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, if not, continue to traverse; the clockwise traversal of the convex hull array hulls means traversing from small to large according to the index, and continuing to traverse from the first position when traversing to the position with the largest index; S2-9. Continue to traverse the convex hull array hulls clockwise to determine the convex hull edge e n According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls clockwise to get the next convex hull edge e n , determine the convex hull edge e n Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e n Generate a triangle from the two endpoints of and point P, and adjust the triangle to satisfy the Delaunay rule. If not, end the traversal; S2-10. Traverse the convex hull array hulls counterclockwise to determine the convex hull edge e b According to the point arrangement rules, a triangle is generated; along the target convex hull edge e p Traverse the convex hull array hulls counterclockwise to get the next convex hull edge e b , determine the convex hull edge e b Whether the points P are arranged in a counterclockwise direction, if so, according to the convex hull edge e b The two endpoints and point P generate a triangle, adjust the triangle to satisfy the Delaunay rule, and add the target convex hull edge e p Set to convex edge e b If not, the traversal ends, where the counterclockwise traversal of the convex hull array hulls is the opposite of the clockwise traversal in S2-8; S2-11. Update the convex hull array hulls, triangle array tris, adjacent triangle array tris, and index array arr; update the convex hull array hulls, triangle array tris, and adjacent triangle array halftris, and calculate the target convex hull edge e p The m value corresponding to the starting point e , respectively connect point P and the target convex hull edge e p The index of the starting point in the point cloud data is put into the index array arr corresponding to the mth p With m e Location; S2-12, loop through S2-6 to S2-11 until all points are used and triangles are generated, and then the loop ends. The convex hull array hulls, the triangle array tris, and the adjacent triangle array halftris are output.
7. The billion-level point cloud data analysis and processing system for railway survey and design according to claim 6 is characterized in that: The working process of the straight line segment array conversion module is as follows: S5-1, obtaining a spatial polyline and a projection direction vector v from a user interaction interface; S5-2. Convert the spatial polyline into multiple straight line segments. For the straight line part, directly convert it into straight line segments. For the curve part, divide the curve into multiple straight line segments with the step size specified by the user, and put them into the index array arr in order.
8. The billion-level point cloud data analysis and processing system for railway survey and design according to claim 7 is characterized in that: The specific working process of the projection module is: S6-1, obtain the first straight line segment; obtain the first straight line segment l in the straight line segment array, with the starting point being P s , the end point is P d ; S6-2, generate rays according to the starting point and projection direction of the straight line segment; s As the starting point, a ray sl is generated along the specified projection direction v; S6-3. Calculate the vertical projection of the starting point of the straight line segment on the xy plane and the corresponding triangle; calculate the starting point P s The vertical projection point P on the xy plane s ', take the triangle where the center of the circumscribed circle C1 is located as the seed triangle T0, and find the vertical projection point P s 'The straight line segment l formed by the center C1 of the circumscribed circle s The intersection with the seed triangle T0 on the xy plane, find the adjacent triangle through the intersection and the adjacent triangle array halftris, and find the adjacent triangle and the line segment l s At the intersection on the xy plane, start looping until you find the vertical projection point P s 'The triangle where the ray sl is located is used as the seed triangle T0' for finding the intersection of the ray sl and the triangulated plane; S6-4, calculate the projection point of the starting point of the straight line segment in the triangulation along the specified direction; find the projection vector v' of the projection direction vector v on the xy plane, according to P s ' and v' form a straight line segment sl', find the intersection e of the straight line segment sl' and the seed triangle T0' on the xy plane t ' and the intersection point P t ', calculate the intersection point P t 'The projection point P on the ray sl in the vertical direction t , determine and calculate P s With P t The straight line and P s 'With P t 'The intersection point P of the composed straight lines s '', if there is an intersection, jump to step S6-5, otherwise, through the intersection edge e t ' and the adjacent triangle array halftris find the adjacent triangle, find the intersection and intersection point of the adjacent triangle with the line segment sl' on the xy plane, and start the loop until the intersection point P of the ray sl and the triangulation is found s ''Until now, P s The triangle where '' is located is denoted as T s '', if the intersection point P is not found after traversing to the edge of the convex hull s '', projection fails, the algorithm ends; S6-5, calculate the projection point of the end point of the straight line segment in the triangulation network along the specified direction; replace P in S6-2 s Replace with P d , continue to execute S6-2 to S6-4, and get P d Projection point P in the triangulation network along the v direction d ''; S6-6. Calculate the bounded plane S formed by the vector v and the straight line segment l; S6-7, calculate the intersection of the bounded plane S and the triangulated network; Calculate bounded plane S and triangle T s ' ... t '' and the intersection point P t '', through the intersection e t '' and the adjacent triangle array halftris find the adjacent triangle, find the intersection of the triangle and the bounded plane S, and continue the loop until P is found d ''Triangle T d ''until; S6-8, connect each point to get the projection result; connect P s '', all the intersection points obtained in S6-7, P d ''The obtained polyline segment lz is the projection of the straight line segment l along the v direction in the triangulation network; S6-9, loop through the straight line segment array, execute S6-5 to S6-9, obtain all straight line segment projections; obtain the next straight line segment l in the straight line segment array, and convert P s '' is replaced by P d '', P d is replaced by the end point of the next straight line segment l, with T d ''As the seed triangle, continue to execute S6-5 to S6-9 until the projection of all straight line segments is obtained and the algorithm ends.
9. An information data processing terminal for implementing the method for analyzing and processing billion-level point cloud data for railway survey and design as described in any one of claims 1 to 4.
10. A computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the method for analyzing and processing billion-level point cloud data for railway survey and design as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Scattered point cloud Delaunay triangulation curved surface reconstruction method based on mapping method
CN103985155A
Automatic discrete point space curved surface triangulation method
CN113610983A