Data processing method for making cross section maps in batches for GPS measurement of river channels or dikes
By applying matrix expression of computational geometry and unsupervised calculation programs in the data post-processing of GPS measurement river channels or embankment projects, the independent grouping, screening and automatic calculation of data is realized, solving the cumbersome and time-consuming problems of data processing in the existing technology, and improving efficiency and accuracy.
Patent Information
- Application Number
- CN202411946115.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-23
AI Technical Summary
In the prior art, there are cumbersome and time-consuming post-processing of data for strip projects such as GPS measurements of river channels or embankments, especially when making cross-sectional drawings in batches, the time and labor costs are high and error-prone.
A data processing method based on matrix expression of computational geometry is proposed. The GPS measurement data is automatically grouped and screened through an unsupervised calculation program, and the mileage and distance measurement of sections are independently calculated to realize batch calculation of section lines and earthwork.
It greatly reduces the time for post-processing of data, improves work efficiency, can meet the drawing and evaluation needs of various parties such as construction, supervision and inspection, and reduces the possibility of manual errors.
Smart Images

Figure CN120027759A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a data post-processing method in the field of engineering surveying, and in particular to a data processing method for batch cross-sectional drawings of ribbon projects such as river courses or levees measured by GPS. Background Art
[0002] Cross-section measurement is an important process in the survey, design and construction of strip projects such as rivers and embankments. Its measurement results can be used for drawing design drawings, calculating the amount of excavated earthwork, controlling construction quality and testing and evaluation. Drone measurement is the most intuitive and fast method, but it has shortcomings such as high operating costs and high technical barriers. Whether it is a handheld GPS mobile station for land operations, an unmanned ship for underwater measurement, or a combination of the two for full-section measurement, there are cumbersome and time-consuming characteristics of post-processing the measurement data. The conventional calculation and drawing steps are to first manually identify the measuring point data and the corresponding cross-section mileage of the relevant measuring section on platforms such as AutoCAD, and then use the applet to calculate the coordinates in the engineering coordinate system for the distance measurement required for the cross-section drawing, and then repeat the same steps to draw other cross-section drawings according to the distance measurement and elevation of the actual measuring points. In addition, this type of conventional drawing needs to be handled by professional technicians, which is cumbersome and time-consuming, with high time and labor costs, and is prone to errors.
[0003] The present invention discloses an algorithm for post-processing data for the cross-section measurement of strip engineering by handheld GPS mobile station or the full cross-section measurement combined with underwater measurement by unmanned boat. According to the characteristics of strip engineering and the local regularity of the measuring points in the measurement process, the coordinates and elevations of each measuring point are summarized after multiple batches of measurement, and an unsupervised calculation program is written to realize the autonomous grouping and screening of cross-section measurement coordinate data, autonomous calculation of the mileage of the actual measured cross section, calculation of the distance of the measuring points in each cross section, and the batch drawing of cross-section lines and excavation volume calculation of the axis of strip engineering such as river channel or levee as straight line or curve. It fundamentally changes the previous practice of drawing cross-section lines one by one and subsequently calculating the earthwork volume in sections. Summary of the invention
[0004] The purpose of the present invention is to provide a method for processing batch cross-sectional diagrams of cross-sectional GPS measurement data of strip projects such as river channels or levees, so as to solve the technical problems existing in the prior art.
[0005] In order to achieve the above object, the technical solution of the present invention is as follows:
[0006] The data processing method for making batch cross-section diagrams of river channels or levees measured by GPS comprises the following steps:
[0007] Step S1, preparing actual measurement points and drawing feature points of the design drawing;
[0008] Step S2, performing preliminary grouping of actual measurement points and identifying isolated points on the measurement data, and deleting or merging them;
[0009] Step S3, determining the relative mapping origin of the preliminary grouping of actual measuring points and the mileage of each measuring section;
[0010] Step S4, calculating the distance of each cross-section measuring point.
[0011] Preferably, the data processing and expression in steps S1, S2, S3 and S4 are all expressed and calculated using matrix representation of computational geometry.
[0012] Preferably, in step S1, the coordinates of the measured points and the coordinates of the feature points in the design drawing are prepared:
[0013] The horizontal coordinate, vertical coordinate and elevation of each actual measurement point are formed into an actual measurement point matrix C according to the measurement order. The coordinate attributes of the feature points are extracted according to the feature lines of the design drawings of the measurement project to form a feature point matrix T, and preprocessed separately to make the format of the measurement point matrix and the feature point matrix T match.
[0014] Preferably, the measurement data of the measured points are imported into a txt or xls format file, and the coordinate attributes of the feature points of the design drawings of the measurement project are stored in a txt or xls format file.
[0015] Preferably, the step S2 performs preliminary grouping of the measured point coordinates and identifies isolated points:
[0016] The distances between two adjacent points in the actual measurement point matrix are calculated in sequence, and the calculated distance values are formed into a distance matrix D according to the order of the points in the actual measurement point matrix C. The actual measurement point matrix is divided into several measurement point matrix groups F, and the average value matrix NK of the horizontal and vertical coordinates of each measurement point matrix initial group F and the average spacing DI of each measurement point matrix initial group F are calculated. The isolated points in the measurement point matrix initial group F are identified and deleted or merged, and the measurement point matrix initial groups F belonging to the same measurement section are merged.
[0017] Preferably, in step S2, the actual measurement point matrix C is divided into a number of independent measurement point matrix preliminary groups F according to the distance between any two adjacent points in the actual measurement point matrix. When the number of coordinate points in the measurement point matrix preliminary group F is less than 3, it is defined as an isolated point, and the effective width of the measured section is less than the average value of the distance between any two adjacent sections. The measurement point matrix preliminary group F is merged, and the effective width of the measured section may be greater than the minimum value of the distance matrix between any two adjacent sections, and the measurement point matrix preliminary group F is deleted.
[0018] Preferably, in step S2, for the initial group F of actual measurement points, the distances from each row of the measurement point mean matrix NK to each row are calculated to form a triangular matrix DD of distances, where dij It is the distance from the i-th actual measuring point preliminary group to the j-th actual measuring point preliminary group. The fixed value s is set according to the average spacing DI of the actual measuring point preliminary group F, and compared with the distances between different measuring point preliminary groups. When the distance is less than the fixed value s, the j-th actual measuring point preliminary group is merged into the q-th actual measuring point preliminary group matrix, and the merged actual measuring point preliminary group and its corresponding mean coordinates in the mean matrix NK are deleted at the same time.
[0019] Preferably, in step S3, (1) the distances from each row coordinate vector of the mean matrix NK to each coordinate point in the feature point matrix T are calculated to form a distance matrix XT, d ij is the distance from the mean vector NK(i) of the horizontal and vertical coordinates of the initial group of the i-th actual measurement point to the horizontal and vertical coordinate vector T(j) of the j-th characteristic point. The j corresponding to the minimum and second minimum values in each row are the two points closest to the i-th section.
[0020] (2) Determine the relative coordinate origin of each measured section
[0021] For the i-th row in the mean matrix NK, that is, the i-th actual measurement point initial group F(i), extract the minimum and second minimum values of the i-th row in the distance matrix XT, calculate the initial matrix TD of the feature point coordinates corresponding to this initial group, and then calculate the distance from each point in the initial matrix TD of the feature point coordinates to the i-th row vector in the mean matrix NK to form a three-point distance matrix TS. Set a fixed value t according to the distribution range of the measurement points belonging to a section along the axial direction during actual measurement. When max(TS)≤t, extract the TD feature point coordinates corresponding to max(TS). This coordinate can be set as the midpoint Z(i) of the coordinates of the actual measurement point initial group in the i-th cycle. If max(T S)>t, delete the TD feature point coordinates corresponding to max(TS), recalculate the average value of the remaining two points in the feature point coordinate initial matrix TD, list them as the new feature point coordinate matrix TD, and re-compare the distances until the requirements are met. Finally, the coordinate midpoints that meet the requirements are included in the feature point coordinate matrix T, and their positions are between the jth and kth rows in the feature point matrix T. The matrix formed is called the mileage feature point coordinate matrix TT. After all the actual measurement points are initially grouped and calculated cyclically, the coordinate midpoints that meet the requirements are included in the coordinate median matrix Z. The calculated coordinate midpoints are used as the relative coordinate origin of the cross-section line to calculate the corresponding mileage.
[0022] (3) Calculate the mileage of the section where the actual measuring point is located
[0023] For the initial grouping F(i) of the i-th actual measurement point: Calculate the distances between any two adjacent points in the mileage feature point matrix TT to form the mileage sequential feature distance matrix TB. Calculate the sum DT of the distances from the coordinate midpoint Z(i) corresponding to the initial grouping F(i) of the actual measurement points to the coordinates of the first row in the mileage feature point coordinate matrix TT, and calculate the mileage K of the corresponding cross-section.
[0024] Preferably, in step S4, (1) Combine or delete the points in the initial grouping of the actual measurement points that are not used for drawing the cross-section line. For the i-th initial grouping F(i) of the actual measurement points, first, calculate the distances between any two points in the initial grouping F(i) of the actual measurement points in sequence. The formed distance matrix is DF, and d ik is the distance from the j-th measurement point to the k-th measurement point in F(i). Combine the horizontal, vertical coordinates and elevation of point i and point j, and simultaneously delete the coordinates of point j and point k synchronously. Calculate the distance matrix DF for the formed F(i) again, and perform an outlier judgment on the formed F(i). If the number of coordinate points is less than 3, delete this initial grouping F(i) of the actual measurement points and the corresponding coordinates in the mean matrix NK of this measurement point grouping matrix.
[0025] (2) Use the second norm to calculate the ranging distances of each measurement point in the cross-section corresponding to each initial grouping of the actual measurement points.
[0026] For the i-th initial grouping F(i) of the actual measurement points, first, calculate the vector AB of the feature point coordinate matrix TD corresponding to the initial grouping F(i) of the actual measurement points, and the vector APj formed by the first row coordinate point in the initial grouping F(i) of the actual measurement points and the corresponding feature point coordinate matrix TD. Secondly, calculate the ranging distance of the j-th point Pj in the initial grouping of the actual measurement points. The ranging distances of all points in an initial grouping of the actual measurement points are saved in a matrix dis, and each initial grouping of the actual measurement points corresponds to a ranging elevation matrix DH(i).
[0027] (3) Form the ranging elevation matrices of each initial grouping of the actual measurement points required for drawing the cross-section line.
[0028] Adopt the order of ranging distances from small to large, extract the elevations of the measurement points in the corresponding initial grouping of the actual measurement points for the ranging distances, and form the ranging elevation matrix DH required for drawing the cross-section line in sequence.
[0029] (4) Conduct outlier analysis on the ranging elevation matrix DH, and at the same time form data in a list format at the specified position, perform batch plotting, and store the data.
[0030] Preferably, in step S4, each initial grouping of the actual measurement points corresponds to a ranging elevation matrix DH. For the points with approximately equal ranging distances di, use the clustering algorithm to combine them, take the average value and delete the combined di. If a new ranging elevation matrix is formed, re-sort DH in ascending order of the ranging distance di.
[0031] Due to the adoption of the above technical solution, the beneficial effects of the present invention are as follows:
[0032] The present invention provides a data processing method for batch drawing of cross-sectional drawings of river channels or levees measured by GPS. The whole process of data processing adopts matrix representation of computational geometry, imports all measured coordinates at one time, autonomously groups and screens available coordinates in an unsupervised manner, autonomously calculates the mileage of the actual measured section, and autonomously calculates the distance of each section measuring point; batch drawing of section lines is realized, which completely changes the conventional method of drawing sections one by one.
[0033] After adopting this method, the calculation time is extremely short, and it is only necessary to check whether the design data of each section is correct.
[0034] The use of this method can greatly improve work efficiency and at the same time meet the drawing and evaluation needs of all parties involved in the project, such as construction, supervision and testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The present invention is further described below in conjunction with the accompanying drawings.
[0036] Figure 1 is a flow chart of an embodiment of the present invention;
[0037] Figure 2 is a flow chart of step S1 in an embodiment of the present invention;
[0038] Figure 3 is a flow chart of step S2 in an embodiment of the present invention;
[0039] Figure 4 is a flow chart of step S3 in an embodiment of the present invention;
[0040] Figure 5 is a flow chart of step S4 in an embodiment of the present invention;
[0041] Figure 6-10 This is a calculation example diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] The technical solution provided by the present invention is applicable to data processing after cross-section measurement of strip projects such as rivers or levees. The following is an explanation of some concepts involved in cross-section measurement and data processing:
[0044] Measuring points: The positions of several points actually occupied by the measuring instrument when conducting cross-sectional measurements of a river channel or embankment project.
[0045] Measuring point coordinates: The vertical and horizontal coordinates and elevations saved when measuring the actual measuring point based on the selected coordinate system and national elevation system.
[0046] Measurement point coordinate matrix: Each row contains three floating point numbers, forming a vector, which are the horizontal coordinate, vertical coordinate and elevation of the measurement point. The measurement coordinates and elevation of each point are listed in a matrix according to the actual measurement order.
[0047] Isolated point: It is an actual measurement point, most of which cannot be used to draw cross-section lines.
[0048] It also includes check points and points with non-fixed solutions. During actual measurement, the distance from other measuring points is too large, exceeding the distance range of the cross-section line. Or due to the measurement point matrix or due to irregular measurement, the recorded point coordinates deviate from the measurement area. Or due to the different positions of the measured points in the measurement point matrix, the distance between the adjacent points before and after is too large.
[0049] Characteristic line: The axis or edge line in the plan of a river channel or embankment project. The characteristic line mentioned below is the axis line.
[0050] Feature points: The endpoints, midpoints or arc angles on the characteristic lines of river channels or embankment projects are feature points.
[0051] Feature point coordinates: horizontal and vertical coordinates of the feature points of a river channel or embankment project.
[0052] Feature point coordinate matrix: Each row has two floating point numbers, which are the horizontal and vertical coordinates of a feature point. In the order from the starting mileage to the ending mileage of the project, the coordinates of the feature points on the feature line are listed in the matrix in sequence. The number of feature points listed is at least 2. The feature point coordinate matrix is referred to as the feature point matrix.
[0053] Initial feature point: The coordinates of the feature point at the starting mileage of the river or embankment project.
[0054] Coordinate median matrix: The matrix stores three coordinate points. These three points are all on the characteristic line and are close to the actual measured section.
[0055] Coordinate mean matrix: The connection between the measurement point matrix and the feature point matrix post-processing module. It is a vector composed of the mean values of the horizontal and vertical coordinates of the measurement point coordinate matrix. Each coordinate mean vector has a one-to-one correspondence with the actual measurement point coordinate matrix, and all coordinate mean vectors constitute the coordinate mean matrix.
[0056] Coordinate midpoint: It is the relative coordinate origin of the actual measured section line. The section line is drawn from the actual measured point, and the coordinate point when the distance measurement is 0.
[0057] like Figures 1 to 10 As shown in the figure, a data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS comprises the following steps:
[0058] Step S1: prepare the coordinates of the actual measurement points and the coordinates of the design drawing's feature points
[0059] (1) After the measurement of the river or embankment project is completed, the measurement data in the instrument is imported into a valid format file for easy calling in the written program. The commonly used file formats are txt and xls. The horizontal coordinate, vertical coordinate and elevation of each actual measurement point are listed in a separate row. The horizontal and vertical coordinates and elevations of all actual measurement points form a measurement point coordinate matrix in the actual measurement order, referred to as the measurement point matrix C. The measurement data of different times can be imported into the same file in any order, and only the order of the points actually measured in a single time is required to be imported.
[0060] (2) View the design drawings of river channels or embankments in the AutoCAD platform, access the declared feature lines and extract the coordinate attributes of the feature points, and store them as valid data files. The commonly used file formats are txt and xls. It is convenient to call in the written program. The feature point coordinates can also be stored in PDF files or various pictures.
[0061] (3) Import the coordinate points in the valid file into the program to form the feature point matrix T and the measurement point matrix C, and preprocess them separately to ensure that the formats of the two matrix data match, that is, the horizontal coordinates or vertical coordinates of the feature point matrix and the actual measurement point matrix are listed in the first column or the second column of the matrix.
[0062] The format is as follows: Feature point matrix
[0063] Measurement point matrix
[0064] Step S2: Perform preliminary grouping of actual measurement points and identification of isolated points on the measurement data, and delete or merge them.
[0065] (1) First, the distances between two adjacent points in the actual measurement point matrix are calculated in sequence, and the calculated distance values are formed into a distance matrix D according to the order of the points in the actual measurement point matrix. D = [d 1 d 2 …d n-1 ], i = 1, 2, ... n-1, where d i The distance between the i-th and i+1-th points is calculated using the horizontal and vertical coordinates in the actual measurement point matrix.
[0066] Secondly, set the value r 1 , when d i ≥r1 When i is the boundary point number of the initial grouping of the actual measurement points. The boundary point number matrix J = [j (1) … j (k) ], i = 1, 2, ... k;
[0067] Setting r 1 It is a multiple of the total width of the river or embankment section, and the multiple is less than 1; you can set r 1 It is a multiple of the distance between adjacent sections of a river channel or embankment, and the multiple is less than 1;
[0068] There are k boundary points that meet the requirements. The actual measurement point matrix C is divided into k+1 matrix groups, which are defined as the initial grouping F of the actual measurement points. F = [C 1 … C k ], i = 1, 2, ... k,
[0069] The order of the coordinates of each point in the actual measurement point matrix is arranged in the order of the points actually measured, but the points used in the actual cross-section line may be distributed in different positions in the matrix. The measurement point matrix can be divided into several independent measurement point matrices according to the distance between any two adjacent points in the matrix greater than a certain value. 1 The fixed value for grouping is derived from the evaluation specifications and design requirements of river or embankment projects. i ≥r 1 Regardless of time i+1 ≥r 1 or i+1 ≤r 1 , the i-th point can be regarded as the boundary point of the grouping.
[0070] The actual measurement point initial grouping only means that the distance between the points in the matrix group is relatively small. It may be the coordinate point of a certain cross-section diagram, but it does not mean that only one coordinate point of the actual measurement point initial grouping is needed to make this cross-section line. There are k boundary point numbers in total, and the actual measurement point matrix C is divided into k+1 matrix groups F. The number of actual measurement points contained in each measurement point initial group matrix is not necessarily the same, and the minimum can be 1 point. When the number of coordinate points in the measurement point matrix initial group is less than 3, it is defined as an isolated point.
[0071] The actual measurement point initial grouping matrix can be stored in the program as a structure, dictionary or custom variable, etc., which can be freely selected according to different software platforms.
[0072] (2) Calculate the average value matrix NNNK of the horizontal and vertical coordinates of each initial group F of actual measuring points and the average spacing DI of each initial group F of actual measuring points.
[0073] First, calculate the coordinate mean matrix There are k+1 actual measurement points initially grouped.
[0074] Each initial group corresponds to a vector of average values of the horizontal and vertical coordinates, and there are n coordinate points in the initial group of measurement points.
[0075]
[0076] Secondly, calculate the distance between each point in NK and the first row of coordinate points in the feature point matrix T to form the distance matrix D1.
[0077] D1=[d 1 d 2 …d m ], i = 1, 2, ... m; and extract the serial numbers in order from small to large in the order of the distance values in D1 to form a serial number vector.
[0078] Finally, the average spacing DI of the initial group F of each actual measuring point is calculated.
[0079] Extract the rows in the mean matrix NK according to the sequence number in the vector, form a new matrix and calculate the distance between any two adjacent points, D2 = [d 1 d 2 …d m-1 ], i = 1, 2, ... m-1;
[0080] The average spacing
[0081] The purpose of calculating the coordinate mean matrix NK is to fuzzily locate the actual measurement section. When there is only one coordinate in the initial group of actual measurement points, the coordinate mean vector of this initial group is the coordinate vector of the measurement point. The rows in the mean matrix NK are extracted in the order in the sequence vector and a new matrix is formed. Although it is just a reordering of the rows in the mean matrix NK, it cannot overwrite the original matrix NK because NK will be frequently used in subsequent steps.
[0082] According to the distance between each point in the calculated mean matrix NK and the eigenvalue matrix T, the possible position of the actual measurement point initial group can be preliminarily determined. After the calculation of the following steps, if some actual measurement point initial groups that do not meet the requirements are deleted, the average spacing value of the actual measurement point initial groups calculated in this step will be smaller. However, if the average spacing DI is calculated directly according to the coordinate mean matrix NK and the D2 formula, when the actual measurement point initial group F corresponding to the actual measurement section is not grouped in sequence according to the size of the project mileage, the calculated possible section spacing will be much larger than the actual section distance, which does not meet the actual measurement situation.
[0083] (3) Identify isolated points in the initial group F of actual measurement points and delete or merge them.
[0084] For a certain actual measurement point initial group F(i), determine the number of coordinate points in the actual measurement point initial group matrix F. If the number of coordinate points is less than 3, extract the corresponding coordinate NK(i) in the mean matrix NK of the measurement point initial group matrix.
[0085] Secondly, calculate the distance from NK(i) to each coordinate point in NK to form a distance matrix D.
[0086] D=[d 1 d 2 …d n ], j = 1, 2, ... n, where d j It is the distance from the initial group F(i) of actual measured points in the loop to the initial group F(j) of actual measured points corresponding to the jth mean coordinate point in the mean matrix NK of measured points.
[0087] If d j ≤s and d j ≠0: then Then make
[0088] If d j >s:
[0089]
[0090] After all the actual measurement points are initially grouped F for cyclic judgment, each matrix F with less than 3 coordinate points and the corresponding NK row coordinates are deleted.
[0091] s is a fixed value, which is determined according to the current status of the river channel or embankment project. It can be set as a multiple of the average spacing DI of the initial grouping F of the actual measuring points, and the multiple value is less than 1.
[0092] In this regard, it cannot be assumed that isolated points in the initial grouping of actual measuring points must be discarded. The simplest section has only one width, which can be determined by connecting two points. At the same time, several points in the isolated point group do not mean that all of them can be used. Due to the differences in the scale of river or levee projects, a section measurement requires several or even dozens of measuring points. The most common method is to arrange these measuring points from one side of the river or levee section to the other side and then make a section line. When the measurement conditions of the section are not met, the actual measuring points may not be arranged in this order. At this time, the conventional practice is to find the measuring points belonging to the same section in the AutoCAD plan view and re-arrange them.
[0093] Regarding the selection of the fixed value s, it is generally believed that the effective width of the measured section is much smaller than the average value of the distance between any two adjacent sections. However, the opposite situation also exists when the construction party conducts section measurement. In actual projects, different fixed values s are selected for classification and processing in the program processing according to the evaluation specifications or construction conditions: (1) In the quality inspection of river channels or embankment projects, the effective width of the measured section is much smaller than the average value of the distance between any two adjacent sections, that is, the distance between any two side points in a measured section is less than the average value of the distance between any two adjacent sections. When the distance between the actual measured point and the adjacent measured section in a measured section is less than the fixed value s, the operation in the program is to merge the measured points of the initial grouping of this actual measured point into the grouping at the jth actual measured point. (2) In the measurement of the construction process of river channels and embankment projects, the effective width of the measured section may be greater than the minimum value of the distance matrix between any two adjacent sections, that is, the maximum value or average value in the distance matrix between any two side points in a measured section will be greater than the minimum value of the distance between any two adjacent sections. At this time, there will be at least two actual measurement points belonging to the same actual measurement section. j ≤s and d j ≠0, if merged, it does not meet the needs of the actual measurement section. At this time, the actual measurement point initial grouping should be deleted, because the reason for this situation is that the number of measurement points in the actual measurement process is too small and does not meet the relevant specifications. In the above two cases, if d j >s, the initial grouping of actual measuring points in the determination cycle cannot be used to make cross-section diagrams, and all need to be deleted. At the same time, the corresponding vectors in the measuring point mean matrix NK need to be deleted.
[0094] For d j ≠0, the minimum value in the distance matrix D is 0, which is the distance between the initial group coordinates of the measurement point in the loop and the mean vector itself. Other minimum values d j The corresponding row number j is the actual initial group of measured points with the closest distance. Of course, when calculating the distance matrix D, the distance between the mean vector of the initial group of actual measured points in the loop and the other vectors in NK can be calculated. In this case, only d j ≤s, that is, the initial grouping of measuring points in the cycle can be merged into the jth actual initial grouping matrix of measuring points, and the mean coordinates in the mean matrix NK corresponding to the isolated point group can be deleted at the same time.
[0095] When the number of coordinate points in the actual measurement point preliminary group F(i) is more than 3, no isolated point identification is performed. It is considered that a cross-section line can be drawn, or it can be merged with other actual measurement point preliminary groups. By processing the isolated points of the actual measurement point preliminary group, the number of actual measurement point preliminary groups may be reduced, and the number of rows of the corresponding measurement point mean matrix will also be reduced. However, the number of remaining actual measurement point preliminary groups F and the number of rows of the measurement point mean matrix NK remain the same.
[0096] In different program platforms, there will be different mapping methods due to different forms of storage variables: if dictionary storage is used, as long as the actual measurement point initial group F(i) and the measurement point mean matrix NK(i) have the same key, they can be called, and the corresponding deletion steps in the above operation can be ignored.
[0097] (4) Initially group and merge the actual measurement points belonging to the same measurement section.
[0098] For the initial grouping F(i) of the i-th actual measurement point in the cycle:
[0099] First, calculate the distance from each row of the measurement point mean matrix NK to the other rows to form a triangular matrix DD of distances. Where d ij It is the distance from the initial group of the i-th actual measuring point to the initial group of the j-th actual measuring point.
[0100] If d jq ≤s and d jq ≠0, then Then make
[0101] That is, the j-th actual measurement point initial group is merged into the q-th actual measurement point initial group matrix, and the merged actual measurement point initial group and the mean coordinates in the corresponding mean matrix NK are deleted at the same time.
[0102] s is a fixed value, which is determined according to the current status of the river channel or embankment project. It can be set as a multiple of the average spacing DI of the initial grouping F of the actual measuring points, and the multiple value is less than 1.
[0103] The coordinate points in each actual measurement point matrix that has been processed as an isolated point are at least 3, but this does not mean that the actual measurement point initial grouping at this time can be used as a cross-section line. The actual measurement points of the same measurement section may be distributed in different actual measurement point initial groups, and they need to be merged using rules. This is another function of the initial grouping of the actual measurement point coordinate matrix mentioned above.
[0104] Unlike the calculation of the distance matrix D when identifying isolated points in step (3), when the unsupervised program processes coordinate data, it does not know which actual measurement point initial groups need to be merged, so it is necessary to find the matrix from any initial group to any other initial group, thus forming a triangular distance matrix DD. The values on the diagonal are the distances from the measurement point matrix vector to itself, which is 0.
[0105] Combine the initial grouping calculation process and Figure 2 The purpose of deleting the merged actual measurement point initial group is to prevent the incomplete section line in the subsequent drawing, and the reason for deleting the jth vector in the measurement point mean matrix is that the actual measurement point initial group corresponding to this vector no longer exists.
[0106] After calculations in the above steps, the coordinates of each actual measuring point in the initial group are all points in an actual measuring section.
[0107] Step S3: Determine the relative origin of the actual measurement points for preliminary grouping and the mileage of each measurement section
[0108] (1) Calculate the distance between each row coordinate vector of the mean matrix NK and each coordinate point in the feature point matrix T, and the distance matrix formed is XT.
[0109] The number of actual measurement points initially grouped is n, which may no longer be k+1 in the initial state. There are m feature points in total, d ij It is the distance from the mean vector NK(i) of the horizontal and vertical coordinates of the initial group of the i-th actual measurement point to the horizontal and vertical coordinate vector T(j) of the j-th feature point. The j corresponding to the minimum and second minimum values in each row are the two points closest to the i-th section.
[0110] The distance matrix XT can also be put into the program loop. For a certain actual measurement point initial group F(i), the distance between the corresponding mean matrix NK(i) row coordinate vector and each coordinate point in the feature point matrix T is calculated. The distance matrix formed is D, D = [d 1 d 2 …d n ], j = 1, 2, ... n, then d j It is the distance from the mean vector NK(i) of the horizontal and vertical coordinates of the initial group of the i-th actual measurement point to the horizontal and vertical coordinate vector T(j) of the j-th feature point.
[0111] In the river channel or levee design drawing, the line connecting adjacent feature points is a straight line. The line connecting all feature points may be a straight line or a curve. In all feature point matrices T, there are always two different feature points that are closer to the actual measurement point initial group F(.), but the mileage numbers corresponding to the two points searched out are not necessarily the same as the mileage number of the actual measurement point initial group. The two closer feature points searched out are only convenient for the subsequent calculation of the intersection or approximate intersection of the line connecting the two feature points and the line connecting the actual section points. This intersection is used as the relative coordinate origin of the section line.
[0112] In addition, for the feature point matrix, as long as the vector point coordinates in the first row of the coordinate matrix are the project starting point coordinates for all the cross-sections required this time, and the coordinates in the feature point matrix are not repeated, it is not required that the point coordinates in the feature point matrix T are arranged in the order of the actual project mileage number. Of course, the distance matrix XT can also be decomposed, and the row vectors of the actual measurement point mean matrix are extracted in each cycle and calculated separately.
[0113] (2) Determine the relative coordinate origin of each measured section.
[0114] For the i-th row in the mean matrix NK, that is, the i-th actual measurement point initial group F(i):
[0115] First, extract the minimum and second minimum values of the i-th row in the distance matrix XT in step 1 of module 3, and record them as xt (1) and xt (2) .
[0116] Secondly, calculate the initial matrix TD of the feature point coordinates corresponding to this initial group. Row vector and xt (1) and xt (2) The corresponding coordinate points in the feature point matrix T, j and k correspond to the column numbers in the distance matrix XT respectively.
[0117] Then, the distance from each point in the initial matrix TD of feature point coordinates to the i-th row vector in the mean matrix NK is calculated to form a three-point distance matrix TS. When max(TS)≤t, the TD feature point coordinates corresponding to min(TS) are extracted. This coordinate can be defined as the midpoint Z(i) of the coordinates of the initial group of actual measurement points in the i-th cycle.
[0118] If max(TS)>t, delete the TD feature point coordinates corresponding to max(TS), recalculate the average value of the remaining two point coordinates in the feature point coordinate initial matrix TD, list them as the new feature point coordinate matrix TD, and re-compare the distances until the requirements are met.
[0119] Assume t to be a constant, whose size depends on the distribution range of the measuring points belonging to a section along the axis direction during actual measurement. It can be set as a multiple of the effective value of the section width of the river channel or embankment project, and the multiple is less than 1.
[0120] Finally, the coordinate midpoints that meet the requirements are included in the feature point coordinate matrix T, and their positions are between the jth and kth rows in the feature point matrix T. The matrix formed is called the mileage feature point coordinate matrix TT. If the coordinate points in the feature point matrix T are arranged in sequence according to the mileage of the design drawing, their positions are set at the kth position, and the other coordinate positions are postponed accordingly.
[0121] After all actual measurement points are initially grouped and cyclically calculated, the coordinate midpoints that meet the requirements are included in the coordinate median matrix Z.
[0122] Through the calculations and loop determinations in the previous sections, it can be considered that the number of rows in the mean matrix NK is still consistent with the number of actual measurement point initial groups F. In each loop, the minimum and second minimum values of the corresponding rows in the distance matrix XT are extracted. The number of columns may be different, but they can all be marked as xt(1) and xt (2) The purpose is to extract the number of columns of the corresponding distance matrix XT, that is, the coordinate vector of the corresponding row in the feature point matrix T. By taking the average of two coordinates as the coordinates of the third point, and then calculating and judging the distances from the three points to the initial grouping mean of the actual measurement points, the calculated coordinate midpoint is still on the line connecting the feature points. When the feature points in the river channel or levee engineering design drawing are on an arc, there may be errors in the calculation in this section, causing the calculated coordinate midpoint to deviate to one side of the arc center point. The solution is to evenly space the arc with encryption points when initially sorting out the feature point coordinates and then extract the point coordinates. When the arc where the feature points in the design drawing are located consists of continuous broken lines, this problem does not exist.
[0123] The cross-section line of the river channel or levee made takes the center of the river channel or the midpoint of the top width of the levee as the origin, with negative and positive distance measurements and corresponding elevations on the left and right sides. The coordinate midpoint calculated by the above method can be used as the relative coordinate origin for drawing the cross-section line. At the same time, in order to make the mileage numbers of each actual measurement cross-section line match the design cross-section data and be included in one drawing, the corresponding mileage numbers need to be calculated to meet the needs of construction, supervision, or inspection and evaluation.
[0124] (3) Calculate the mileage number of the cross-section where the actual measurement point is located.
[0125] For the initial grouping F(i) of the i-th actual measurement point:
[0126] First, calculate the distances between any two adjacent points in the mileage feature point matrix TT to form the mileage sequence feature distance matrix TB. TB = [d 1 d 2 … d n-1 , j = 1, 2, … n - 1, where d j is the distance calculated using the abscissa and ordinate in the mileage feature point coordinate matrix between the j-th and the (j + 1)-th points.
[0127] Secondly, calculate the sum DT of the distances from the coordinate midpoint Z(i) corresponding to the initial grouping F(i) of the actual measurement point to the coordinates of the first row in the mileage feature point coordinate matrix TT, where q is the row number of the coordinate midpoint Z(i) of the initial grouping of the actual measurement point in the mileage feature point coordinate matrix TT.
[0128] Finally, calculate the mileage number K of the corresponding cross-section, that is, K = DT + K 0 .
[0129] K 0 is the engineering mileage number corresponding to the coordinate point of the first row in the feature point matrix T.
[0130] It can be considered that the engineering mileage (pile number) corresponding to the midpoint of this coordinate is consistent with the mileage of the actual measurement point initial group. The mileage is calculated based on the pile number of the starting point of the river or embankment project and the corresponding feature point coordinates. When the river is bifurcated at the same mileage, or there are more than one river, the feature point coordinates of the branch river are included in a separate matrix and the same calculation steps are followed.
[0131] Before calculating the distance between any two adjacent points in the mileage feature point matrix TT, first determine whether there are coincident point coordinates in the mileage feature point matrix TT. The calculated distance values are formed into a distance matrix DT according to the order of the points in the actual measurement point matrix.
[0132] The mileage is calculated by adding the first distance in the mileage sequence characteristic distance matrix TB to the measured section characteristic origin corresponding to the distance matrix TB. The method of using the coordinate midpoint to the first coordinate point matrix of the mileage characteristic point matrix TT cannot be used because the characteristic point connection line of the river channel or levee project may be an arc.
[0133] Step S4: Calculate the distance of each cross-section measuring point
[0134] (1) Merge or delete the points in the initial grouping of actual measurement points that are not used for cross-section lines.
[0135] For the initial grouping F(i) of the i-th actual measurement point:
[0136] First, the distance between any two points in the initial grouping F(i) of actual measurement points is calculated in turn, and the distance matrix formed is DF.
[0137] Formula d jk is the distance from the jth measuring point to the kth measuring point in F(i).
[0138] Secondly, set the value r 2 , when d jk <r 2 , and Δh jk When <Δh,
[0139] The specific coordinate matrix of the initial grouping of actual measurement points F(i) becomes That is, merge the horizontal and vertical coordinates and elevation of point i and point j, that is, calculate the average coordinates of these two points and store them in the initial group of actual measurement points, and delete the coordinates of point j and point k synchronously. jk It is the absolute value of the elevation difference between the j-th measuring point and the k-th measuring point in F(i).
[0140] Constant r 2 The principle for determining it can be a multiple of the cross-sectional width of the river channel or embankment project, where the multiple is less than 1.
[0141] The constant Δh can be set as a multiple of the absolute value of the elevation difference of the river channel or embankment project section, where the multiple is less than 1.
[0142] Then, the distance matrix of the formed F(i) is calculated again as DF, using d jk <r 2 , and Δh ij <Δh to judge until all d jk All satisfy d jk >r 2 until.
[0143] Finally, the formed F(i) is subjected to isolated point identification. If the number of coordinate points is less than 3,
[0144]
[0145] That is, delete the actual measurement point initial group F(i) and the corresponding coordinates in the mean matrix NK of the measurement point initial group matrix.
[0146] After the calculation and data merging of the above modules, the cross section line can be drawn from the coordinate points in the actual measurement point initial group, but there may still be unnecessary points for drawing. In order to make the cross section line meet the needs of the project and achieve an aesthetic effect, it is necessary to delete the unnecessary points in the actual measurement point initial group. These unnecessary points are mostly derived from multiple measurements at the same actual point position, the small spacing between actual measurement points, or the existence of several different actual measurement points at the same distance measurement position. If different distance measurements are preset and the elevation of the corresponding points is calculated by interpolation, it can meet the calculation requirements and make cross sections, but it does not meet the data source requirements for river channel or embankment evaluation. If the method of directly deleting redundant points is adopted, some useful data will be lost. Therefore, under the premise that the elevation changes are not large, the elevation of several points to be deleted is first averaged, otherwise the deletion cannot be performed even if the spacing between the points is very close. At the same time, when the number of coordinate points contained in the actual measurement point initial group F is less than 3, it is considered that the minimum standard of the number of points required to make a cross section line is not met, and this initial group does not meet the conditions for merging the initial group, and it needs to be deleted.
[0147] Because it is impossible to determine the position of the points of each coordinate in the initial group F of the actual measured points in the actual measured section, if the distance from the coordinate of any measured point to the first coordinate point in F is calculated, an incorrect result will be obtained. Therefore, the method of calculating the distance from any point in the initial group to any other point is adopted and a circular judgment is performed.
[0148] (2) Use the binary norm to calculate the distance of each measuring point in the corresponding section of each actual measuring point initial grouping.
[0149] For the initial grouping F(i) of the i-th actual measurement point:
[0150] First, calculate the vector AB of the coordinate matrix TD of the characteristic points corresponding to the initial grouping F(i) of the actual measurement points. The vector AP is composed of the initial grouping F(i) of the actual measurement points and the coordinate points of the first row in the corresponding coordinate matrix TD of the characteristic points. j .
[0151] AB = A - B = [x 1 -x 3 y 1 -y 3 0].
[0152] AP j = A - P i = [x 1 -x j y 1 -y j 0].
[0153] A = [x 1 y 1 and B = [x 3 y 3 are the coordinates of the first row and the last row points in the coordinate matrix TD of the characteristic points respectively. P j = [x j y j is the coordinate of the j-th point in the initial grouping F(i) of the actual measurement points.
[0154] Secondly, calculate the ranging of the j-th point P in the initial grouping of the actual measurement points. The ranging of all the initial groupings of the actual measurement points is saved in a matrix dis. j The ranging of all the initial groupings of the actual measurement points is saved in a matrix dis.
[0155]
[0156] Each initial grouping of the actual measurement points corresponds to a ranging and elevation matrix DH(i).
[0157]
[0158] In order to unify the left or right orientation of the cross-section lines made in the project, it is necessary to first determine the normal lines of each actual measurement cross-section line. The coordinate matrix TD of the characteristic points corresponding to the initial grouping F(.) of the actual measurement points only contains three coordinate points. By selecting two of them, the normal line of this cross-section can be calculated. The direction of the normal line AB is uniformly specified as from the small mileage number to the large mileage number.
[0159] During the loop calculation, extract the actual measurement point initial grouping and the measured section feature point matrix TD (3*2 matrix, i.e. three coordinate points) corresponding to the mileage feature point matrix, and the previously calculated mileage feature point matrix TT. First, expand the matrix TD to a 3*3 matrix, with the third column all being 0. According to the positional relationship between the point coordinates in TD and TT, select the point corresponding to the first row in U as the vector starting point, and the point corresponding to the third point as the vector end point. If this requirement is not met, reorder the points in TD. At the same time, the actual measurement point initial grouping matrix is expanded from the original m*2 to m*3, with the values of the third column all being 0.
[0160] After the above steps, the basic conditions for drawing the cross-section line have been met: each actual measurement point initial group corresponds to a mileage, each actual measurement point initial group has a set of ranging elevation matrices, and each actual measurement point initial group can determine the left and right directions when drawing the cross-section line.
[0161] In the program loop, due to the different program platforms, if a dictionary or other storage method is used, there is no need to re-sort the initial grouping of actual measurement points.
[0162] (3) Form the distance measurement elevation matrix of the initial grouping of the actual measurement points required for drawing the cross section line.
[0163] The distance measurement is carried out in ascending order, and the elevation of the measuring points in the initial group of actual measuring points corresponding to the distance measurement is extracted, and the distance measurement elevation matrix required for the section line is formed in sequence. Each initial group of actual measuring points corresponds to a distance measurement elevation matrix For distance measurement d i Approximately equal points are merged using a clustering algorithm, the average is taken and the merged points are deleted i , or use Figure 2 Step 4) If a new distance measurement height matrix is formed, re-measure the distance d i Sort the DHs from smallest to largest.
[0164] (4) In the measurement and evaluation, according to the relevant specifications, the DH is analyzed for deviations, and the data in a list format is generated at the specified location. The required slope ratio and other results can be batch mapped in the human-computer interaction interface according to the mileage K and the ranging elevation matrix DH. For details, see the attached figure of the calculation example to store the data.
[0165] The present invention is further explained in conjunction with specific engineering section measurement data.
[0166] In the program, you need to follow the steps of the above four modules and calculate them in sequence. Reversing the order will produce incorrect results. This example is the post-processing of the measurement data after a section of river engineering was excavated using the land method. The total width of the river section is about 50m, the slope ratio on both sides is 1:3, and the mileage of the starting point of the project is 0+100.
[0167] Step S1: prepare actual measurement point coordinates and feature point coordinates;
[0168] The prerequisite is that the actual measurement process of the river or embankment project meets the relevant specifications. After the measurement work is completed, the measurement data in the instrument is imported into a valid format file. The commonly used file formats are txt and xls. The feature point coordinates are stored in a valid format file. The commonly used file formats are txt and xls. The coordinate points in the valid file are imported into the program to form a feature point matrix and an actual measurement point matrix, and preprocessed separately to ensure that the formats of the two matrix data match. That is, the horizontal coordinates or vertical coordinates of the feature point matrix and the actual measurement point matrix are listed in the first or second column of the matrix.
[0169] The format is as follows: Feature point matrix Actual measurement point matrix Feature point coordinates: stored in the xls file, the first row of coordinates is the coordinates corresponding to the minimum value of the project mileage, and each point is on the riverbed axis, as shown in Table 1:
[0170] E N 493497.6195 3764890.378 494238.2155 3762274.447 494428.8924 3761600.938 494724.2115 3760559.536 494647.1538 3760831.27 494745.7382 3760483.476 494942.1835 3759706.971 495103.5357 3759090.172 495457.4584 3757745.986 495714.6246 3756769.277
[0171] Table 1 Actual measurement point coordinates: stored in the xls file, as shown in Table 2:
[0172]
[0173]
[0174] Table 2
[0175] Import the feature point coordinates and the actual measured point coordinates into the program to form the feature point coordinate matrix T and the actual measured point coordinate matrix C, keeping the first two columns stored as x(E) and y(N).
[0176] Step S2: Preprocess and group the measured point coordinates.
[0177] 1) First, the distances between two adjacent points in the actual measurement point matrix are calculated in sequence, and the calculated distance values are formed into a distance matrix D according to the order of the points in the actual measurement point matrix.
[0178] D=[d 1 d 2 …d n-1 ], i = 1, 2, ... n-1, where d i The distance between the i-th and i+1-th points is calculated using the horizontal and vertical coordinates in the actual measurement point matrix.
[0179] Secondly, set the value r 1 , when d i ≥r 1When i is the boundary point number of the initial grouping of the actual measurement points. The boundary point number matrix J = [j (1) … j (k) ], i = 1, 2, ... k;
[0180] Setting r 1 It is a multiple of the total width of the river or embankment section, and the multiple is greater than 1; you can set r 1 It is a multiple of the distance between adjacent sections of a river channel or embankment, and the multiple is less than 1;
[0181] There are k boundary point numbers that meet the requirements. The actual measurement point matrix C is divided into k+1 matrix groups, which are defined as the initial grouping F of actual measurement points.
[0182] Distance Matrix
[0183] D=[d 1 d 2 …d n-1 ]=[333.7 16.43 35.71 11.17 5.657 755.5 6.268 10.9134.62 9.447 6.442 457.9 6.913 1213.8 1213.9 19.59 8.885 12.78 1073.3 8.7079.037 19.85 8.524 10.93 1348.2 8.458 9.110 21.00 9.801 7.553], n=31. The total width of the river section is about 50m, and r is set 1 It is a multiple of the total width of the river or embankment section, which is 2.
[0184] Boundary point number matrix J = [j (1) … j (k) ] = [1 6 12 14 15 19 25];
[0185] There are 7 boundary point numbers that meet the requirements, and the corresponding values are the row numbers of the actual measurement point matrix C. The actual measurement point matrix C is divided into 8 matrix groups, which together constitute the initial group F of actual measurement points.
[0186] The actual measurement point initial grouping F = [C 1 … C k+1 ], i = 1, 2, ... k + 1, Among them, C 1 =[493534.1472 3764893.382 22.9956
[0187]
[0188]
[0189]
[0190] C 5 = [493608.3462 3764567.034 18.8983
[0191]
[0192]
[0193] C 8 is the last six rows of the actual measurement point matrix C.
[0194] 2) Calculate the mean value matrix NK of the horizontal and vertical coordinates of each initial grouping F of the actual measurement points and the average spacing DI of each initial grouping F of the actual measurement points.
[0195] First, calculate the coordinate mean value matrix There are k + 1 initial groupings of actual measurement points.
[0196] Each initial grouping corresponds to a mean value vector of the horizontal and vertical coordinates, and there are n coordinate points in the initial grouping of the measurement points.
[0197]
[0198] Second, calculate the distances from each point in NK to the coordinate point of the first row in the feature point matrix T to form the distance matrix D1,
[0199] D1 = [d 1 d 2 … d m , i = 1, 2, … m; and extract the serial numbers in ascending order of the distance values in D1 to form the serial number vector.
[0200] Finally, calculate the average spacing DI of each initial grouping F of the actual measurement points.
[0201] Extract the rows in the mean value matrix NK in the order of the serial numbers in the vector to form a new matrix and calculate the spacing between any two adjacent points, D2 = [d 1 d 2 … d m-1 , i = 1, 2, … m - 1;
[0202] Then the average spacing
[0203]
[0204] D1 = [36.65 342.3 1099.3 1555.2 341.7 1553.7 2618.3 3968.1]
[0205] D2=[337.4 756.9 456.2 1213.8 1212.7 1064.6 1349.8]
[0206] The average section spacing is DI = 913.1m, and the minimum section spacing is 337.4.
[0207] 3) Identify isolated points in the initial group F of actual measurement points and delete or merge them.
[0208] For a certain actual measurement point initial group F(i), determine the number of coordinate points in the actual measurement point initial group matrix F. If the number of coordinate points is less than 3, extract the corresponding coordinate NK(i) in the mean matrix NK of the measurement point initial group matrix.
[0209] Secondly, calculate the distance from NK(i) to each coordinate point in NK to form a distance matrix D.
[0210] D=[d 1 d 2 …d n ], j = 1, 2, ... n, where d j It is the distance from the initial group F(i) of actual measured points in the loop to the initial group F(j) of actual measured points corresponding to the jth mean coordinate point in the mean matrix NK of measured points.
[0211] If d j ≤s and d j ≠0: then Then make
[0212] If d j >s:
[0213]
[0214] s is a fixed value, which is determined according to the current status of the river channel or embankment project. It can be set as a multiple of the average spacing DI of the initial grouping F of the actual measuring points, and the multiple value is less than 1.
[0215] s=0.1*DI=0.1*913.1≈100
[0216] By querying the number of coordinate points in the initial group F of the actual measured points through the program, it can be known that there are three isolated point groups that meet the requirements, namely C 1 , C 4 , C 5 .
[0217] C 4 For example, the distance from NK(4) to each coordinate point in NK is D.
[0218] D=[1548.1 1212.9 456.2 0 1213.8 33.0 1063.4 2413.1]
[0219] Cause 6 =33.0<100,
[0220]
[0221] After all the actual measurement points are initially grouped F and judged cyclically, the matrix F and the corresponding NK row coordinates of each coordinate point with less than 3 are deleted. 4 have
[0222] 4) Initially group and merge the actual measuring points belonging to the same measuring section.
[0223] For the initial grouping F(i) of the i-th actual measurement point in the cycle:
[0224] First, calculate the distance from each row of the measurement point mean matrix NK to the other rows to form a triangular matrix DD of distances. Where d ij It is the distance from the initial group of the i-th actual measuring point to the initial group of the j-th actual measuring point.
[0225] If d jq ≤s and d jq ≠0, then Then make
[0226] That is, the j-th actual measurement point initial group is merged into the q-th actual measurement point initial group matrix, and the merged actual measurement point initial group and the mean coordinates in the corresponding mean matrix NK are deleted at the same time.
[0227] s is a fixed value, which is determined according to the current status of the river channel or embankment project. It can be set as a multiple of the average spacing DI of the initial grouping F of the actual measuring points, and the multiple value is less than 1.
[0228] go through Figure 2 The actual measurement points are initially grouped into F = [C 1 … C 8 ], i = 1, 2, ... 8, becomes C 1 It is an isolated point and has been deleted.
[0229] NK=[NK(2) NK(3) NK(6) NK(7) NK(8)].
[0230] Step S3: Determine the mileage of each measured section.
[0231] 1) Calculate the distance between each row coordinate vector of the mean matrix NK and each coordinate point in the feature point matrix T. The distance matrix formed is XT, The number of actual measurement points initially grouped is n, which may no longer be k+1 in the initial state, while the number of feature points is m, d ij is the distance from the mean vector of the horizontal and vertical coordinates of the initial group of the i-th actual measurement point to the horizontal and vertical coordinate vector of the j-th feature point. The j corresponding to the minimum and second minimum values in each row are the two feature points closest to the i-th section.
[0232] The distance matrix XT can also be put into the program loop. For a certain actual measurement point initial group F(i), the distance between the corresponding mean matrix NK(i) row coordinate vector and each coordinate point in the feature point matrix T is calculated. The distance matrix formed is D, D = [d 1 d 2 …d m ], j = 1, 2, ... m, then d j It is the distance from the mean vector NK(i) of the horizontal and vertical coordinates of the initial group of the i-th actual measurement point to the horizontal and vertical coordinate vector T(j) of the j-th feature point.
[0233] Take the actual measurement point initial grouping F(1) as an example:
[0234] The distance matrix is D, m=10.
[0235] D=[342.3 2376.3 3076.3 4158.8 3876.3 4237.8 5038.5 5676.0 7065.98075.8]
[0236] 2) Determine the relative coordinate origin of each measured section.
[0237] For the i-th row in the mean matrix NK, that is, the i-th actual measurement point initial group F(i):
[0238] First, extract Figure 3 In step 1), the minimum and second minimum values of the i-th row in the distance matrix XT are respectively recorded as xt (1) and xt (2) .
[0239] Secondly, calculate the initial matrix TD of the feature point coordinates corresponding to this initial group. Row vector and xt (1) and xt (2) The corresponding coordinate points in the feature point matrix T, j and k correspond to the column numbers in the distance matrix XT respectively.
[0240] Then, the distance from each point in the initial matrix TD of feature point coordinates to the i-th row vector in the mean matrix NK is calculated to form a three-point distance matrix TS. When max(TS)≤t, the TD feature point coordinates corresponding to min(TS) are extracted. This coordinate can be defined as the midpoint Z(i) of the coordinates of the initial group of actual measurement points in the i-th cycle.
[0241] If max(TS)>t, delete the TD feature point coordinates corresponding to max(TS), recalculate the average value of the remaining two point coordinates in the feature point coordinate initial matrix TD, list them as the new feature point coordinate matrix TD, and re-compare the distances until the requirements are met.
[0242] Assume t to be a constant, whose size depends on the distribution range of the measuring points belonging to a section along the axis direction during actual measurement. It can be set as a multiple of the total width of the river channel or embankment project section, which is less than 1.
[0243] Finally, the coordinate midpoints that meet the requirements are included in the feature point coordinate matrix T, and their positions are between the jth and kth rows in the feature point matrix T. The matrix formed is called the mileage feature point coordinate matrix TT. If the coordinate points in the feature point matrix T are arranged in sequence according to the mileage of the design drawing, their positions are set at the kth position, and the other coordinate positions are postponed accordingly.
[0244] After all actual measurement points are initially grouped and cyclically calculated, the coordinate midpoints that meet the requirements are included in the coordinate median matrix Z.
[0245] The minimum value is xt (1) =342.3, the next smallest value is xt (2) =2376.3.
[0246] The initial matrix of feature point coordinates is
[0247] The total width of the river section is about 50m. L = 50, the multiple is 0.4, then the fixed value t = 0.4*L = 20. After the cycle judgment, Z 1 =[493590.19403764563.386].
[0248] Coordinate median matrix
[0249] 3) Calculate the mileage of the section where the actual measuring point is located.
[0250] For the initial grouping F(i) of the i-th actual measurement point:
[0251] First, the distance between any two adjacent points in the mileage feature point matrix TT is calculated to form the mileage sequence feature distance matrix TB. TB = [d 1 d 2 …dn-1 ], j = 1, 2, ... n-1, where d j The distance between the jth and j+1th points is calculated using the horizontal and vertical coordinates in the mileage feature point coordinate matrix.
[0252] Secondly, calculate the sum of the distances DT from the coordinate midpoint Z(i) corresponding to the initial group F(i) of the actual measurement points to the first row of coordinates in the mileage feature point coordinate matrix TT. Where q is the row number of the coordinate midpoint Z(i) of the initial grouping of actual measurement points in the mileage feature point coordinate matrix TT.
[0253] Finally, calculate the mileage K of the corresponding section, that is, K = DT + K 0 .
[0254] Mileage order feature distance matrix
[0255] TB=[339.8 759.3 456.6 1162.9 0 699.9 800 0 282.4 79.0 800.9 637.51389.9 0]
[0256] Take the actual measurement point initial grouping F(1) as an example: K 0 =0+100
[0257]
[0258] K=DT+K 0 =339.8+100=0+440
[0259] Take the actual measurement point initial group F(5) as an example: K 0 =0+100
[0260]
[0261] K=DT+K 0 =4218.5+100≈4+320
[0262] Step S4: Calculate the distance of each cross-section measuring point.
[0263] 1) Merge or delete the points in the initial grouping of actual measurement points that are not used for cross-section lines.
[0264] For the initial grouping F(i) of the i-th actual measurement point:
[0265] First, the distance between any two points in the initial grouping F(i) of actual measurement points is calculated in turn, and the distance matrix formed is DF.
[0266] Formula d jk is the distance from the jth measuring point to the kth measuring point in F(i).
[0267] Secondly, set the value r 2 , when d jk <r 2 , and Δh ij When <Δh,
[0268] The specific coordinate matrix of the initial grouping of actual measurement points F(i) becomes That is, merge the horizontal and vertical coordinates and elevation of point i and point j, that is, calculate the average coordinates of these two points and store them in the initial group of actual measurement points, and delete the coordinates of point j and point k synchronously. ij It is the absolute value of the elevation difference between the j-th measuring point and the k-th measuring point in F(i).
[0269] Constant r 2 The principle for determining it can be a multiple of the cross-sectional width of the river channel or embankment project, where the multiple is less than 1.
[0270] The constant Δh can be set as a multiple of the absolute value of the elevation difference of the river channel or embankment project section, where the multiple is less than 1.
[0271] Then, the distance matrix of the formed F(i) is calculated again as DF, using d jk <r 2 , and Δh ij <Δh to judge until all d jk All satisfy d jk >r 2 until.
[0272] Finally, the formed F(i) is subjected to isolated point identification. If the number of coordinate points is less than 3,
[0273]
[0274] 2) Use the binary norm to calculate the distance of each measuring point in the corresponding section of each initial grouping of actual measuring points.
[0275] For the initial grouping F(i) of the i-th actual measurement point:
[0276] First, calculate the vector AB of the feature point coordinate matrix TD corresponding to the actual measurement point initial group F(i), the vector AP formed by the first row of coordinate points in the actual measurement point initial group F(i) and the corresponding feature point coordinate matrix TD j .
[0277] AB=AB=[x 1 -x 3 y 1 -y 3 0].
[0278] AP j=AP i =[x 1 -x j y 1 -y j 0].
[0279] A=[x 1 y 1 ] and B = [x 3 y 3 ] are the coordinates of the first and last rows of points in the feature point coordinate matrix TD. j =[x j y j ] is the coordinate of the jth point in the initial grouping F(i) of actual measurement points.
[0280] Secondly, calculate the jth point P in the initial grouping of actual measurement points j All the distance measurements of an actual measurement point are initially grouped and stored in a matrix dis.
[0281]
[0282] Each actual measurement point initial group corresponds to a distance height matrix DH(i). j = 1, 2...n. The elevations of the distance measurement and actual measurement points in the initial grouping together form the distance measurement elevation matrix.
[0283] Take the actual measurement point initial grouping F(1) as an example:
[0284]
[0285]
[0286] 3) Form the distance measurement elevation matrix for the initial grouping of actual measurement points required for making the cross-section line.
[0287] The distance measurement is carried out in ascending order, and the elevation of the measuring points in the initial group of actual measuring points corresponding to the distance measurement is extracted, and the distance measurement elevation matrix required for the section line is formed in sequence. Each initial group of actual measuring points corresponds to a distance measurement elevation matrix i=1,2…n,for distance measurement d i Approximately equal points are merged using a clustering algorithm, the average is taken and the merged points are deleted i , or use Figure 2 Step 4) If a new distance measurement height matrix is formed, re-measure the distance d i Sort the DHs from smallest to largest.
[0288] Take the actual measurement point initial grouping F(1) as an example:
[0289]
[0290] Through the program loop, the matrices of the other four ranging elevations can be obtained.
[0291] 4) In the measurement and evaluation, according to the relevant specifications, the DH is analyzed for deviations, and the data in a list format is formed at the specified location. The required slope ratio and other parameters are derived from the batch mapping and storage data in the human-computer interaction interface based on the mileage K and the ranging elevation matrix DH.
[0292] In this embodiment, only the calculation results based on the above modules are listed. Figures 6 to 10 .
[0293] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS, characterized in that: The following steps are involved: Step S1, preparing actual measurement points and drawing feature points of the design drawing; Step S2, performing preliminary grouping of actual measurement points and identifying isolated points on the measurement data, and deleting or merging them; Step S3, determining the relative mapping origin of the preliminary grouping of actual measuring points and the mileage of each measuring section; Step S4, calculating the distance of each cross-section measuring point.
2. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 1, characterized in that: The data processing and expression in steps S1, S2, S3 and S4 all adopt matrix representation and calculation of computational geometry.
3. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 2, characterized in that: In step S1, the measured point coordinates and the feature point coordinates in the design diagram are prepared: The horizontal coordinate, vertical coordinate and elevation of each actual measurement point are formed into an actual measurement point matrix C according to the measurement order. The coordinate attributes of the feature points are extracted according to the feature lines of the design drawings of the measurement project to form a feature point matrix T, and preprocessed separately to make the format of the measurement point matrix and the feature point matrix T match.
4. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 3, characterized in that: The measurement data of the measured points are imported into a txt or xls format file, and the coordinate attributes of the feature points of the design drawings of the measurement project are stored in a txt or xls format file.
5. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 3, characterized in that: The step S2 performs preliminary grouping of the measured point coordinates and identifies isolated points: The distances between two adjacent points in the actual measurement point matrix are calculated in sequence, and the calculated distance values are formed into a distance matrix D according to the order of the points in the actual measurement point matrix C. The actual measurement point matrix is divided into several measurement point matrix groups F, and the average value matrix NK of the horizontal and vertical coordinates of each measurement point matrix initial group F and the average spacing DI of each measurement point matrix initial group F are calculated. The isolated points in the measurement point matrix initial group F are identified and deleted or merged, and the measurement point matrix initial groups F belonging to the same measurement section are merged.
6. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 5, characterized in that: In the step S2, the actual measurement point matrix C is divided into a number of independent measurement point matrix preliminary groups F according to the distance between any two adjacent points in the actual measurement point matrix. When the number of coordinate points in the measurement point matrix preliminary group F is less than 3, it is defined as an isolated point. The effective width of the measured section is less than the average value of the distance between any two adjacent sections. The measurement point matrix preliminary group F is merged. The effective width of the measured section may be greater than the minimum value of the distance matrix between any two adjacent sections. The measurement point matrix preliminary group F is deleted.
7. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 6, characterized in that: In the step S2, for the actual measuring point preliminary group F, the distances from each row of the measuring point mean matrix NK to each row are calculated respectively to form a triangular matrix DD of distances, wherein dij is the distance from the i-th actual measuring point preliminary group to the j-th actual measuring point preliminary group, a fixed value s is set according to the average spacing DI of the actual measuring point preliminary group F, and compared with the distances between different measuring point preliminary groups, when the distance is less than the fixed value s, the j-th actual measuring point preliminary group is merged into the q-th actual measuring point preliminary group matrix, and the mean coordinates in the merged actual measuring point preliminary group and its corresponding mean matrix NK are deleted at the same time.
8. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 5, characterized in that: In step S3, (1) the distances between the coordinate vectors of each row of the mean matrix NK and each coordinate point in the feature point matrix T are calculated to form a distance matrix XT, where dij is the distance between the horizontal and vertical coordinate mean vector NK(i) of the initial group of the i-th actual measurement point and the horizontal and vertical coordinate vector T(j) of the j-th feature point, and the j corresponding to the minimum value and the second minimum value in each row are the two points closest to the i-th section; (2) Determine the relative coordinate origin of each measured section; For the i-th row in the mean matrix NK, that is, the i-th actual measurement point initial group F(i), extract the minimum and second minimum values of the i-th row in the distance matrix XT, calculate the initial matrix TD of the feature point coordinates corresponding to this initial group, and then calculate the distance from each point in the initial matrix TD of the feature point coordinates to the i-th row vector in the mean matrix NK to form a three-point distance matrix TS. Set a fixed value t according to the distribution range of the measurement points belonging to a section along the axial direction during actual measurement. When max(TS)≤t, extract the TD feature point coordinates corresponding to max(TS). This coordinate can be set as the midpoint Z(i) of the coordinates of the actual measurement point initial group in the i-th cycle. If max(T S)>t, delete the TD feature point coordinates corresponding to max(TS), recalculate the average value of the remaining two points in the feature point coordinate initial matrix TD, list them as the new feature point coordinate matrix TD, and re-compare the distances until the requirements are met. Finally, the coordinate midpoints that meet the requirements are included in the feature point coordinate matrix T, and their positions are between the jth and kth rows in the feature point matrix T. The matrix formed is called the mileage feature point coordinate matrix TT. After all the actual measurement points are initially grouped and calculated cyclically, the coordinate midpoints that meet the requirements are included in the coordinate median matrix Z. The calculated coordinate midpoints are used as the relative coordinate origin of the cross-section line to calculate the corresponding mileage. (3) Calculate the mileage of the section where the actual measuring point is located; For the i-th actual measurement point initial group F(i): calculate the distance between any two adjacent points in the mileage feature point matrix TT to form the mileage sequence feature distance matrix TB, calculate the sum of the distances DT from the coordinate midpoint Z(i) corresponding to the actual measurement point initial group F(i) to the first row of coordinates in the mileage feature point coordinate matrix TT, and calculate the mileage K of the corresponding section.
9. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 8, characterized in that: In the step S4, (1) points in the actual measurement point preliminary group that are not used for making the cross section line are merged or deleted. For the i-th actual measurement point preliminary group F(i), first, the distances between any two points in the actual measurement point preliminary group F(i) are calculated in sequence, and the distance matrix formed is DF, djk is the distance from the j-th measurement point to the k-th measurement point in F(i), the horizontal and vertical coordinates and elevation of point i and point j are merged, and the coordinates of point j and point k are deleted synchronously. The distance matrix of the formed F(i) is calculated again as DF, and the formed F(i) is identified as an isolated point. If the number of coordinate points is less than 3, the corresponding coordinates in the mean matrix NK of the actual measurement point preliminary group F(i) and the measurement point preliminary group matrix are deleted; (2) Use the two-norm to calculate the distance of each measuring point in the corresponding section of each actual measuring point initial grouping; For the i-th actual measurement point preliminary group F(i), first, calculate the vector AB of the feature point coordinate matrix TD corresponding to the actual measurement point preliminary group F(i), the vector APj formed by the actual measurement point preliminary group F(i) and the first row of coordinate points in the corresponding feature point coordinate matrix TD, and then calculate the distance measurement of the j-th point Pj in the actual measurement point preliminary group. All the distance measurements of an actual measurement point preliminary group are stored in a matrix dis, and each actual measurement point preliminary group corresponds to a distance measurement height matrix DH(i); (3) Forming the distance measurement height matrix of each actual measurement point preliminary grouping required for the section line; Adopting the order of ranging from small to large, extract the elevation of the measuring points in the initial group of actual measuring points corresponding to the ranging, and sequentially form the ranging elevation matrix DH required for making the section line; (4) Perform deviation analysis on the distance measurement elevation matrix DH, and at the same time form data in a list format at the specified location, perform batch mapping, and store data.
10. The data processing method for making batch cross-sectional diagrams of river channels or levees measured by GPS according to claim 9, characterized in that: In step S4, each actual measurement point is initially grouped into a corresponding distance measurement elevation matrix DH, and the points with approximately equal distance measurement di are merged using a clustering algorithm, the average value is taken and the merged di is deleted, and if a new distance measurement elevation matrix is formed, DH is re-sorted in the order of distance measurement di from small to large.