Section line generation method and apparatus

CN122949007APending Publication Date: 2026-10-20POWERCHINA ZHONGNAN ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611432952.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]然而,现有技术中对于复杂地形下生成的横断面线左右方向不稳定,在回头弯等带角度翻折路线处极易出现断面方向翻转,导致横断面线左右点序错误

Benefits of technology

本申请提供了一种断面线生成方法及装置,首先确定桩号点在所述目标对象中心线上的垂足处的切向量,然后将该垂足处的切向量绕Z轴逆时针旋转90度后得到的向量方向,固定为该垂足处的左法向,如此,保证左法向始终指向路线前进方向的左侧,使得大角度翻折路线的(例如回头弯路线)断面线的左/右法向不会翻转。同时,分别沿该垂足处的左法向及其反向,确定垂足处对应的断面线左端点和断面线右端点,在这两个端点的目标连线上等距采样得到多个采样点,根据采样点的平面坐标值从数字高程模型中获取采样点的高程值,并根据多个采样点的平面坐标值和高程值确定关键点集合,进而基于少于等距采样点数量的关键点即可生成目标对象在桩号点对应的断面线,从而在保证地形特征表达的同时显著减少断面线点数,提升后续设计与算量效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application discloses a method and apparatus for generating cross-section lines, relating to the field of data processing technology. The method includes: acquiring station point data of the centerline of a target object, including the plane coordinate values ​​of multiple station points; determining the foot of the perpendicular from the station point to the centerline of the target object, and determining the tangent vector at the foot of the perpendicular; rotating the tangent vector counterclockwise by 90 degrees around the Z-axis to obtain the left normal; determining the left and right endpoints of the cross-section line corresponding to the foot of the perpendicular along the left normal and its opposite direction; sampling multiple sampling points at equal intervals along the target line connecting the left and right endpoints of the cross-section line; obtaining the elevation values ​​of the sampling points from a digital elevation model based on their plane coordinate values; determining a set of key points based on the plane coordinate values ​​and elevation values ​​of the multiple sampling points; and generating the cross-section line corresponding to the station point of the target object based on the set of key points. Using the cross-section line generation method of this application can solve the problem of incorrect left-right point order in cross-section lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and apparatus for generating cross-sectional lines. Background Technology

[0002] Hydropower project roads (such as construction access roads, site roads, material yard roads, water diversion and plant connection roads, etc.) are often located in mountainous and canyon terrain, with drastic changes in longitudinal and transverse slopes, winding road lines, a large number of cross-sections, and frequent updates. Therefore, the extraction and generation of cross-section lines is crucial for complex terrain.

[0003] However, in existing technologies, the left and right directions of cross-section lines generated under complex terrain are unstable. At hairpin bends and other angled turns, the cross-section direction is easily reversed, resulting in errors in the left and right point sequence of the cross-section lines. Summary of the Invention

[0004] This application provides a method and apparatus for generating cross-sectional lines to solve or at least partially solve the defects or deficiencies in related technologies.

[0005] In a first aspect, this application provides a method for generating cross-sectional lines, the method comprising: Obtain the station point data of the centerline of the target object; the station point data includes the plane coordinate values ​​of each of the multiple station points; Determine the foot of the perpendicular from the station point to the center line of the target object, and determine the tangent vector at the foot of the perpendicular; Rotate the tangent vector at the foot of the perpendicular 90 degrees counterclockwise around the Z-axis to obtain the left normal at the foot of the perpendicular. Determine the left endpoint and right endpoint of the cross-section line corresponding to the foot of the perpendicular by following the left normal direction and its opposite direction, respectively. Multiple sampling points are obtained at equal intervals along the target line connecting the left endpoint and the right endpoint of the cross-section line. The elevation values ​​of the sampling points are obtained from the digital elevation model based on the plane coordinate values ​​of the sampling points. A set of key points is determined based on the plane coordinate values ​​and elevation values ​​of the multiple sampling points. The cross-section line of the target object corresponding to the station point is generated based on the set of key points.

[0006] Secondly, this application provides a cross-section line generating device, the cross-section line generating device comprising: The data acquisition module is used to acquire the station point data of the centerline of the target object; the station point data includes the plane coordinate values ​​of multiple station points. The tangent determination module is used to determine the foot of the perpendicular from the station point to the center line of the target object, and to determine the tangent vector at the foot of the perpendicular. The left normal direction determination module is used to rotate the tangent vector at the foot of the perpendicular 90 degrees counterclockwise around the Z-axis to obtain the left normal direction at the foot of the perpendicular. The endpoint determination module is used to determine the left endpoint and right endpoint of the cross-section line corresponding to the foot of the perpendicular, respectively, along the left normal direction and its opposite direction at the foot of the perpendicular. The section line generation module is used to obtain multiple sampling points at equal intervals on the target line connecting the left end point and the right end point of the section line, obtain the elevation value of the sampling points from the digital elevation model according to the plane coordinate value of the sampling points, determine the key point set according to the plane coordinate value and elevation value of the multiple sampling points, and generate the section line of the target object corresponding to the station point based on the key point set.

[0007] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a method and apparatus for generating cross-section lines. First, the tangent vector at the foot of the perpendicular from the station point to the center line of the target object is determined. Then, the direction of the vector obtained by rotating the tangent vector at the foot of the perpendicular counterclockwise by 90 degrees around the Z-axis is fixed as the left normal direction at the foot of the perpendicular. This ensures that the left normal direction always points to the left of the route's forward direction, preventing the left / right normal directions of the cross-section line in routes with large angle bends (such as hairpin bends) from flipping. Simultaneously, the left and right endpoints of the cross-section line corresponding to the foot of the perpendicular are determined along the left normal direction and its opposite direction. Multiple sampling points are obtained at equal intervals along the target line connecting these two endpoints. The elevation values ​​of the sampling points are obtained from the digital elevation model based on their planar coordinates. A set of key points is determined based on the planar coordinates and elevation values ​​of the multiple sampling points. Thus, the cross-section line corresponding to the station point of the target object can be generated based on fewer key points than the number of equidistant sampling points. This significantly reduces the number of cross-section line points while ensuring the representation of terrain features, improving the efficiency of subsequent design and calculation. Attached Figure Description

[0008] Figure 1 This is a flowchart illustrating a method for generating cross-section lines according to an embodiment of this application; Figure 2 A comparison diagram of cross-sectional line effects provided in an embodiment of this application; Figure 3 A schematic diagram of standardized cross-sectional line data provided in an embodiment of this application; Figure 4 This is a schematic diagram of the functional modules of a cross-section line generation device provided in another embodiment of this application. Detailed Implementation

[0009] In one exemplary embodiment, such as Figure 1As shown, a method for generating cross-sectional lines is provided. This method is executed by a computer device, specifically a terminal or server, or both. The terminal can be, but is not limited to, various desktop computers, laptops, etc., and the server can be a standalone server, a server cluster consisting of multiple servers, or even a cloud server.

[0010] In the embodiments of this application, such as Figure 1 As shown, the method for generating cross-section lines includes steps 101 to 105. Wherein: Step 101: Obtain the station point data of the center line of the target object; the station point data includes the plane coordinate values ​​of each of the multiple station points.

[0011] In one optional implementation, if the station point data and the center lines of terrain objects are not stored in a one-to-one mapping relationship, but rather the station point data and the center lines of terrain objects are stored independently, then the station point data of all terrain objects can first be read from the station point information document, including... Among them, the station number The station number is The plane coordinates are ( The station point information document can contain station point data belonging to the centerlines of multiple terrain objects; that is, the station point information document includes station point data for the centerlines of multiple terrain objects. Then, the user-selected target object (one or more target objects can be selected) can be determined. The target object is any one of these terrain objects, and the station point data for the target object's centerline is determined based on the perpendicular distance from each station point to the target object's centerline. Specifically, for each station point... Determine its closest point to the centerline of the target object. (i.e., perpendicular foot), and with a preset distance tolerance. Filter out those whose distance from the corresponding foot of the perpendicular is less than or equal to By finding the station number, the station number data of the center line of the target object can be obtained.

[0012] Optionally, a preset distance tolerance is allowed. The range is 1-5m, for example, 3m.

[0013] In one alternative implementation, if the station point data and the center line of the terrain object are stored in a one-to-one mapping relationship, the station point data of the center line of the target object can be found directly based on the object identifier of the target object selected by the user.

[0014] Step 102: Determine the foot of the perpendicular from the station point to the center line of the target object, and determine the tangent vector at the foot of the perpendicular.

[0015] If the perpendicular foot of the station point on the center line of the target object has been determined in step 101, the perpendicular foot data can be directly reused in this step without needing to determine it again.

[0016] In one alternative implementation, the tangent vector at the foot of the perpendicular can be determined by the following steps: For the foot of the perpendicular that is not located at the end of the center line of the target object, the tangent vector at the foot of the perpendicular is determined by the following perturbation difference formula (1); (1); For the foot of the perpendicular located at the end of the center line of the target object, the tangent vector at the foot of the perpendicular is determined by the following perturbation difference formula (2); (2); in, Let be the foot of the perpendicular from the i-th station among multiple station points onto the center line of the target object. For the foot The tangent vector at that point, The parametric curve function corresponding to the centerline of the target object. Let be the position point on the center line of the target object corresponding to the parameter value t. The parameter value t belongs to the parameter domain of the parametric curve function, and there is a one-to-one correspondence between the parameter values ​​in the parameter domain of the parametric curve function and the position points on the center line of the target object. For the foot The corresponding parameter value in the parameter domain of the parametric curve function (optionally, it can be the foot of the perpendicular). The corresponding i-th station point (station number) is the preset perturbation parameter, and ∥·∥ is the Euclidean norm.

[0017] In this embodiment, This is the parametric curve function corresponding to the centerline of the target object. This parametric curve function represents the one-to-one mapping relationship between the position point on the centerline of the target object and the parameter value in the parameter domain. Given a parameter value in the parameter domain, this parametric curve function can output the position point (position point coordinates) corresponding to that parameter value on the centerline of the target object.

[0018] In this embodiment, for the foot of the perpendicular that is not located at the end of the centerline of the target object, the tangent vector at the foot of the perpendicular is determined by the forward difference method, and the parameters are adjusted accordingly. A perturbation is introduced to construct the difference quotient required to calculate the tangent vector; for the foot of the perpendicular located at the end of the target object's centerline, the tangent vector at that foot is determined by the backward difference method, similarly by adjusting the parameters. We introduce perturbations to construct the difference quotient needed to calculate the tangent vector.

[0019] The tangent vector is essentially the velocity vector (derivative) of the curve at a certain point. This implementation method can, when the derivative is unavailable, use parameters... By introducing perturbations to construct the difference quotient, instability of the derivative at the foot of the perpendicular is avoided, especially instability of the derivative at the foot of the perpendicular located at the end of the center line of the target object.

[0020] Optionally, perturbation parameters The range is 0.0005-0.01, for example, select 0.001.

[0021] Step 103: Rotate the tangent vector at the foot of the perpendicular 90 degrees counterclockwise around the Z-axis to obtain the left normal vector at the foot of the perpendicular.

[0022] In this step, for the foot of the perpendicular , will hang down The foot of the perpendicular can be obtained by rotating the tangent vector at that point counterclockwise by 90 degrees around the Z-axis. The left normal direction at the location. It should be noted that the X-axis, Y-axis and Z-axis in the embodiments of this application are coordinate axes in the geodetic coordinate system, and the X coordinate value, Y coordinate value and Z coordinate value in the embodiments of this application are coordinate values ​​in the geodetic coordinate system.

[0023] In this embodiment, the tangent vector at the foot of the perpendicular is first determined, and then the direction of the vector obtained by rotating the tangent vector at the foot of the perpendicular 90 degrees counterclockwise around the Z-axis is fixed as the left normal direction at the foot of the perpendicular. In this way, the left normal direction is always pointed to the left side of the route's forward direction, so that the left / right normal directions of the cross-section line of the route with a large angle bend (such as a hairpin bend) will not be reversed.

[0024] Step 104: Determine the left endpoint and right endpoint of the cross-section line corresponding to the foot of the perpendicular along the left normal direction and its opposite direction.

[0025] In one alternative implementation, this step can be achieved by the following steps: Along the left normal direction at the foot of the perpendicular, the left endpoint of the cross-section line corresponding to the foot of the perpendicular is determined by the following formula (3); (3); Along the left normal direction at the foot of the perpendicular, the right endpoint of the section line corresponding to the foot of the perpendicular is determined by the following formula (4); (4); in, Let be the foot of the perpendicular from the i-th station among multiple station points onto the center line of the target object. For the foot The left endpoint of the corresponding cross-section line, For the foot The right endpoint of the corresponding cross-section line, For the preset half-width of the cross-section, For the foot The left normal direction at the location, For the foot The opposite direction of the left normal at that location.

[0026] Optionally, the preset half-width of the cross-section The range is 30-120m, for example, 60m can be selected.

[0027] Step 105: Sample multiple sampling points at equal intervals along the target line connecting the left and right endpoints of the cross-section line. Obtain the elevation values ​​of the sampling points from the digital elevation model based on their planar coordinate values. Determine the set of key points based on the planar coordinate values ​​and elevation values ​​of the multiple sampling points. Generate the cross-section line of the target object at the station point based on the set of key points.

[0028] In this step, connect the left endpoint of the cross-section line. and the right end point of the cross-section line After obtaining the target line, equidistant sampling is performed along the target line to obtain multiple sampling points. Currently, only the planar coordinates (XY coordinates) of these sampling points are known, while their elevation values ​​(Z coordinates) are unknown. Next, a Digital Elevation Model (DEM) can be used to obtain the elevation value of each sampling point. The sampling points are then input. plane coordinates Sampling points can be read from the digital elevation model. elevation value ,in, Thus, the XYZ coordinate values ​​of each sampling point can be obtained.

[0029] Then, a set of key points can be determined based on the planar coordinates and elevation values ​​of multiple sampling points. An exemplary implementation may include the following steps 1051 to 1053.

[0030] Step 1051: Determine the sampling point data for each sampling point based on its plane coordinates and elevation values. The sampling point data includes the path distance and elevation value of the sampling point. The path distance is the distance from the left endpoint of the cross-section line along the target line to the sampling point.

[0031] In one implementation, the path distance of each sampling point can be determined by the following methods: Based on the length of the target line Sampling interval of equidistant sampling or number of samples and sampling points ordinal number (0≥) ≥ ), determine sampling points path distance .

[0032] Among them, the length of the target line Sampling interval Number of samples and sampling points ordinal number The relationship between them is as follows: .

[0033] Based on the path distance and elevation value of each sampling point on the target connection line, a sampling point sequence can be constructed. .

[0034] Optionally, sampling interval The range is 0.1-2.0m, for example, 0.5m can be selected.

[0035] Step 1052: Based on the sampling point data of multiple sampling points, determine the slope angle abrupt change sampling point, local extreme value sampling point, and endpoint sampling point from the multiple sampling points.

[0036] In one alternative implementation, the slope angle change sampling point can be determined as follows: for each sub-line between two adjacent non-endpoint sampling points in a plurality of sampling points, the slope angle change between each two adjacent sub-lines is determined based on the path distance and elevation value of the sampling points. If the slope angle change between two adjacent sub-lines is greater than a preset slope angle threshold, then the sampling point connecting the two adjacent sub-lines is determined as the slope angle change sampling point.

[0037] In this embodiment, for ordinal numbers Non-endpoint sampling points in the range [1, m-2] That is, the intermediate sampling point, calculate the non-endpoint sampling point. Sub-connection with the previous sampling point slope And calculate the non-endpoint sampling point. Sub-connection with the previous sampling point slope The calculation formula is as follows: .

[0038] in, For this non-endpoint sampling point Elevation value, For this non-endpoint sampling point Previous sampling point Elevation value, For this non-endpoint sampling point The next sampling point Elevation value, For this non-endpoint sampling point (to the starting point of the cross-section line) ) path distance, For this non-endpoint sampling point Previous sampling point (to the starting point of the cross-section line) ) path distance, For this non-endpoint sampling point The next sampling point The path distance (to the starting point of the cross-section line).

[0039] Then calculate using the following formula. and Change in slope angle between : .

[0040] in, It is the arctangent function.

[0041] like Then the non-endpoint sampling point The sampling points for determining abrupt changes in slope angle were identified, among which, This is the preset slope angle threshold.

[0042] Optionally, a preset slope threshold can be used. The range is 3-8°, for example, 5° can be selected.

[0043] In one alternative implementation, local extreme sampling points can be determined as follows: for each non-endpoint sampling point among multiple sampling points, if the elevation value of the non-endpoint sampling point is greater than the elevation value of the previous sampling point and greater than the elevation value of the next sampling point, or the elevation value of the non-endpoint sampling point is less than the elevation value of the previous sampling point and less than the elevation value of the next sampling point, then the non-endpoint sampling point is determined as a local extreme sampling point.

[0044] In this embodiment, for ordinal numbers Non-endpoint sampling points in the range [1, m-2] That is, the intermediate sampling point, if the non-endpoint sampling point Satisfy: This non-endpoint sampling point elevation value Greater than the previous sampling point elevation value And greater than the next sampling point elevation value ,Right now and Then the non-endpoint sampling point can be selected. The sampling point is identified as a local extreme value, specifically a local peak value sampling point.

[0045] In this embodiment, for ordinal numbers Non-endpoint sampling points in the range [1, m-2] That is, the intermediate sampling point, if the non-endpoint sampling point Satisfy: This non-endpoint sampling point elevation value Less than the previous sampling point elevation value And smaller than the next sampling point elevation value ,Right now and Then the non-endpoint sampling point can be selected. The sampling point was identified as a local extreme value, specifically a local valley value.

[0046] In one alternative implementation, the endpoint sampling point can be determined by: setting the left endpoint of the cross-section line (i.e., the sampling point) as the sampling point. ) and the right endpoint of the cross-section line (i.e., the sampling point) () is determined as the endpoint sampling point.

[0047] Step 1053: Generate a set of key points based on the sampling points of rapid slope changes, local extreme value sampling points, and endpoint sampling points.

[0048] In one alternative implementation, the abrupt slope change sampling points, local extreme value sampling points, and endpoint sampling points can be determined as the key point set, that is, all abrupt slope change sampling points, local extreme value sampling points, and endpoint sampling points are retained as key points of the cross-section line.

[0049] In an alternative implementation, the key point set of the cross-section line can be generated through the following steps 1053-1 to 1053-2.

[0050] Step 1053-1: Generate a set of candidate key points, which includes sampling points for abrupt changes in slope angle, sampling points for local extreme values, and sampling points for endpoints.

[0051] In this step, the abrupt slope change sampling points, local extreme value sampling points, and endpoint sampling points determined in step 1052 are all added to the candidate key point set as candidate key points for subsequent screening.

[0052] Step 1053-2: Use the Douglas-Peucker algorithm (DP algorithm for short) to filter the candidate key point set and obtain the key point set.

[0053] The Douglas-Peucker algorithm is a recursive curve simplification algorithm. In this embodiment, the Douglas-Peucker algorithm can be used to simplify the number of points in the lines connecting all candidate key points, and filter out candidate key points that contribute little to the shape of the line (i.e., the vertical distance between the line and the beginning and end points of the cross-section line is less than the preset distance tolerance τ). The remaining candidate key points are the final key points.

[0054] Optionally, the preset distance tolerance τ is in the range of 0.05-0.30m, for example, 0.15m.

[0055] This implementation generates a set of key points for the cross-section line through steps 1051 to 1053, forming key terrain inflection points that reflect the locations of abrupt changes in slope angle, local extreme values, and endpoints. This solves the problems in the prior art where only equidistant sampling results in an excessive number of points required to generate the cross-section line, key terrain inflection points (ridges, gullies, slope bends, peaks and valleys, etc.) are difficult to automatically identify, and subsequent design calculations are too large. Thus, while ensuring the expression of terrain features, the number of points is significantly reduced, improving the efficiency of subsequent design and calculation.

[0056] After generating the keypoint set, follow the left endpoint of the cross-section line. Starting from the right endpoint of the cross-section line Following the order of the endpoints, all keypoints in the keypoint set are connected sequentially to obtain the cross-section lines. Then, a displayable cross-section object is generated by instantiating a linear object, thus obtaining the target object at the station point. The corresponding cross-sectional lines.

[0057] In this embodiment of the application, the target object is generated at the station point. The corresponding cross-sectional lines can include the generated target object at the station point. The corresponding section lines can display objects (e.g., CAD (Computer-Aided Design) objects), and generate target objects at station points. The corresponding cross-sectional data (for example, including the standardized cross-sectional data below).

[0058] In one optional implementation, the cross-section line generation method further includes the following steps: Insert block references for multiple sampling points respectively; A strategy of starting and committing transactions in batches is adopted, and attributes are written to all blocks in batches based on the sampling point data of multiple sampling points.

[0059] In this implementation, the visualization output of the cross-section line can be achieved in two stages. In the first stage, block references are inserted for multiple sampling points on the cross-section line, thereby instantiating the cross-section line into a graphic entity object instance. Here, the inserted block references have not yet been written with attributes; only a list of attribute tasks to be written is generated based on the inserted block references. One block reference for a sampling point corresponds to one attribute task to be written, and the first stage ends there.

[0060] A transaction is an indivisible sequence of execution for accessing and manipulating a data source. Transactions require that data operations strictly adhere to the "transaction start - data operation - transaction commit" protocol. Violation of the protocol results in execution rejection; if an error occurs midway, all reverse operations are automatically executed, reverting to the data state before the transaction started. This is the essence of a transaction. In the second phase, the list of pending attribute tasks is read, and every N pending attribute tasks are grouped into a batch, with transactions started in batches. This allows for batch processing of N pending attribute tasks (i.e., batch writing attributes to N block references). Processing the same batch of N pending attribute tasks requires only one transaction start operation and one transaction commit operation, thus reducing rendering stutter and the overhead of transaction start and commit. When writing attributes in batches, the automatic screen refresh (REGEN) function can be turned off (if this function is not turned off, the screen must redraw the cross-section line every time an attribute is written to a block reference). This reduces the number of screen refreshes, saving rendering overhead and reducing device power consumption.

[0061] Optionally, the attributes written for the block reference of the sampling point may include one or more of the following: the station number corresponding to the sampling point, and the left / right type identifier L / M / R of the sampling point (L indicates that the sampling point is located at the foot of the perpendicular). The left side and the M mark indicate that the sampling point is the foot of the perpendicular. The R symbol itself indicates that the sampling point is at the foot of the perpendicular. (Right side), sampling point elevation value H.

[0062] like Figure 2 As shown, a comparison is made between a cross-sectional line A generated by the method provided in this application embodiment and a measured cross-sectional line B. Figure 2 It can be seen that the key topographic inflection points of section line A are basically the same as those of the measured section line B, but the number of key points is smaller.

[0063] In an alternative implementation, standardized cross-section data can also be generated based on the key point set of the cross-section line through the following steps: Based on a preset standardized data template, standardized cross-section data is generated. The standardized cross-section data includes the relative distances (i.e., straight-line distances) from at least some key points and their perpendicular feet to the center line of the target object, as well as the elevation values ​​of at least some key points and their perpendicular feet.

[0064] For example, such as Figure 3 The image shows standardized cross-sectional data for a specific section. The first row contains basic cross-sectional information, including the section name (number), station number, data unit, and measurement date. The second row contains key point information, including key point numbers. Left X (X=1-11) indicates key points located to the left of the target object's centerline, and right X (X=1-11) indicates key points located to the right of the target object's centerline. The cell between left 1 and right 1 is divided into three sub-cells, indicating the meaning of the third and fourth rows of information, as well as the type of land cover (e.g., vegetation) at the cross-section. The third row contains relative distance data, including 11 key points to the left of the target object's centerline, 11 key points to the right of the target object's centerline, and the perpendicular distance. The fourth line contains elevation data, including 11 key points to the left and right of the target object's centerline, as well as the perpendicular distance. Each of their respective elevation values.

[0065] Optionally, if the key points of a cross-section are insufficient to fill the 11 columns on the left and right, they can be left blank according to the standardized data template; if there are more than 11 key points, they can be filtered according to a preset strategy (e.g., priority of local extreme value sampling points + priority of relative distance, etc.), or the number of columns can be expanded to configurable N columns.

[0066] The section line generation method provided in this application embodiment can be applied to the generation of cross section lines, solving the problem of incorrect left and right point order in cross section lines. The generation of longitudinal section lines can reuse the key point generation strategy and standardized data output strategy provided in this application embodiment.

[0067] Compared with the prior art, the exemplary embodiments of this application have the following significant effects: 1) Stable in the left and right direction: By using the tangent vector at the foot of the perpendicular and fixing the direction of the tangent vector rotated 90° counterclockwise as the left normal, the direction of the cross-section line is always from left to right, which completely solves the problem of the cross-section flipping left and right at hairpin bends / turns. 2) Automatic extraction of key points and controllable data volume: The simplified combination of "slope angle change point + local extreme point + endpoint + DP algorithm" retains key terrain features such as ridges, gullies, slope breaks, peaks and valleys. While ensuring the expression of terrain features, it significantly reduces the number of redundant points, improves design and calculation efficiency, and reduces post-processing costs. 3) Deliverables are directly available: output standardized data and graphic objects that conform to the cross-sectional result table of hydropower projects (left-right symmetry, relative distance + elevation data); 4) High efficiency on a large scale: The two-stage write attribute and batch transaction strategy significantly reduce lag, making it suitable for engineering production with thousands of cross sections and tens of thousands of points.

[0068] Based on the same inventive concept, this application also provides a cross-section line generating apparatus for implementing the cross-section line generating method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more cross-section line generating apparatus embodiments provided below can be found in the limitations of the cross-section line generating method described above, and will not be repeated here.

[0069] In one exemplary embodiment, such as Figure 4 As shown, a cross-section line generating device is provided, the cross-section line generating device includes: The data acquisition module is used to acquire the station point data of the centerline of the target object; the station point data includes the plane coordinate values ​​of multiple station points. The tangent determination module is used to determine the foot of the perpendicular from the station point to the center line of the target object, and to determine the tangent vector at the foot of the perpendicular. The left normal direction determination module is used to rotate the tangent vector at the foot of the perpendicular 90 degrees counterclockwise around the Z-axis to obtain the left normal direction at the foot of the perpendicular. The endpoint determination module is used to determine the left endpoint and right endpoint of the section line corresponding to the foot of the perpendicular, respectively, along the left normal direction at the foot of the perpendicular and its opposite direction. The section line generation module is used to obtain multiple sampling points at equal intervals on the target line connecting the left and right endpoints of the section line. The elevation values ​​of the sampling points are obtained from the digital elevation model based on the plane coordinate values ​​of the sampling points. The set of key points is determined based on the plane coordinate values ​​and elevation values ​​of multiple sampling points. The section line corresponding to the station point of the target object is generated based on the set of key points.

[0070] Optionally, a set of key points is determined based on the planar coordinates and elevation values ​​of multiple sampling points, including: The sampling point data for each sampling point is determined based on its plane coordinates and elevation values. The sampling point data includes the path distance and elevation value of the sampling point. The path distance is the distance from the left endpoint of the cross-section line along the target line to the sampling point. Based on the sampling data from multiple sampling points, the sampling points for abrupt changes in slope angle, local extreme value sampling points, and endpoint sampling points are determined from the multiple sampling points; A set of key points is generated based on sampling points with rapid slope changes, local extreme value sampling points, and endpoint sampling points.

[0071] Optionally, based on the sampling point data, sampling points for abrupt changes in slope angle, local extreme value sampling points, and endpoint sampling points are determined from multiple sampling points, including: For each sub-connection between two adjacent non-endpoint sampling points in multiple sampling points, the slope angle change between two adjacent sub-connections is determined based on the path distance and elevation value of the sampling points. If the slope angle change between two adjacent sub-connections is greater than the preset slope angle threshold, the sampling point connecting the two adjacent sub-connections is determined as the slope angle abrupt change sampling point. For each non-endpoint sampling point among multiple sampling points, if the elevation value of the non-endpoint sampling point is greater than the elevation value of the previous sampling point and greater than the elevation value of the next sampling point, or if the elevation value of the non-endpoint sampling point is less than the elevation value of the previous sampling point and less than the elevation value of the next sampling point, then the non-endpoint sampling point is determined as a local extreme value sampling point. The left and right endpoints of the cross-section line are designated as endpoint sampling points.

[0072] Optionally, a set of key points is generated based on the sampling points of abrupt changes in slope angle, local extreme value sampling points, and endpoint sampling points, including: Generate a candidate key point set, which includes a slope angle abrupt change sampling point, a local extreme value sampling point, and an endpoint sampling point; The Douglas-Puk algorithm is used to filter the candidate keypoint set to obtain the keypoint set.

[0073] Optionally, determining the tangent vector at the foot of the perpendicular includes: For the foot of the perpendicular that is not located at the end of the center line of the target object, the tangent vector at the foot of the perpendicular is determined by the following perturbation difference formula (1); (1); For the foot of the perpendicular located at the end of the center line of the target object, the tangent vector at the foot of the perpendicular is determined by the following perturbation difference formula (2); (2); in, Let be the foot of the perpendicular from the i-th station among multiple station points onto the center line of the target object. For the foot The tangent vector at that point, The parametric curve function corresponding to the centerline of the target object. Let be the position point on the center line of the target object corresponding to the parameter value t. The parameter value t belongs to the parameter domain of the parametric curve function, and there is a one-to-one correspondence between the parameter values ​​in the parameter domain of the parametric curve function and the position points on the center line of the target object. For the foot The corresponding parameter value in the parameter domain of the parametric curve function. is the preset perturbation parameter, and ∥·∥ is the Euclidean norm.

[0074] Optionally, the left endpoint and right endpoint of the section line corresponding to the foot of the perpendicular are determined along the left normal direction at the foot of the perpendicular and its opposite direction, respectively, including: Along the left normal direction at the foot of the perpendicular, the left endpoint of the cross-section line corresponding to the foot of the perpendicular is determined by the following formula (3); (3); Along the left normal direction at the foot of the perpendicular, the right endpoint of the section line corresponding to the foot of the perpendicular is determined by the following formula (4); (4); in, Let be the foot of the perpendicular from the i-th station among multiple station points onto the center line of the target object. For the foot The left endpoint of the corresponding cross-section line, For the foot The right endpoint of the corresponding cross-section line, For the preset half-width of the cross-section, For the foot The left normal direction at the location, For the foot The opposite direction of the left normal at that location.

[0075] Optionally, the cross-section line generating device is also used for: Insert block references for each of the multiple sampling points; A strategy of starting and committing transactions in batches is adopted, and attributes are written to all blocks in batches based on the sampling point data of multiple sampling points.

[0076] Optionally, the cross-section line generating device is also used for: Based on a preset standardized data template, standardized cross-sectional data is generated; the standardized cross-sectional data includes the relative distances of at least some key points and their perpendicular feet to the center line of the target object, as well as the elevation values ​​of at least some key points and their perpendicular feet.

[0077] Optionally, the sampling point data for each sampling point is determined based on its planar coordinates and elevation values, including: The path distance of each sampling point is determined based on the length of the target line, the sampling interval or number of samples for equidistant sampling, and the ordinal number of each sampling point.

[0078] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0079] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0080] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0081] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0082] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for generating cross-sectional lines, characterized in that, The method for generating cross-section lines includes: Obtain the station point data of the centerline of the target object; the station point data includes the plane coordinate values ​​of each of the multiple station points; Determine the foot of the perpendicular from the station point to the center line of the target object, and determine the tangent vector at the foot of the perpendicular; Rotate the tangent vector at the foot of the perpendicular 90 degrees counterclockwise around the Z-axis to obtain the left normal at the foot of the perpendicular. Determine the left endpoint and right endpoint of the cross-section line corresponding to the foot of the perpendicular along the left normal direction and its opposite direction, respectively; Multiple sampling points are obtained at equal intervals along the target line connecting the left endpoint and the right endpoint of the cross-section line. The elevation values ​​of the sampling points are obtained from the digital elevation model based on the plane coordinate values ​​of the sampling points. A set of key points is determined based on the plane coordinate values ​​and elevation values ​​of the multiple sampling points. The cross-section line of the target object corresponding to the station point is generated based on the set of key points.

2. The method for generating cross-sectional lines according to claim 1, characterized in that, The step of determining the key point set based on the planar coordinates and elevation values ​​of the multiple sampling points includes: The sampling point data for each sampling point is determined based on the plane coordinates and elevation values ​​of each sampling point; the sampling point data includes the path distance and elevation value of the sampling point, wherein the path distance is the distance from the left endpoint of the cross-section line along the target line to the sampling point; Based on the sampling data of the multiple sampling points, the abrupt slope change sampling point, the local extreme value sampling point, and the endpoint sampling point are determined from the multiple sampling points; A set of key points is generated based on the abrupt slope change sampling points, the local extreme value sampling points, and the endpoint sampling points.

3. The method for generating cross-sectional lines according to claim 2, characterized in that, The step of determining the abrupt slope change sampling point, the local extreme value sampling point, and the endpoint sampling point from the plurality of sampling points based on the sampling point data includes: For each pair of adjacent non-endpoint sampling points among the plurality of sampling points, the slope angle change between each pair of adjacent sub-lines is determined based on the path distance and elevation value of the sampling points. If the slope angle change between two adjacent sub-lines is greater than a preset slope angle threshold, the sampling point connecting the two adjacent sub-lines is determined as the slope angle abrupt change sampling point. For each non-endpoint sampling point among the plurality of sampling points, if the elevation value of the non-endpoint sampling point is greater than the elevation value of the previous sampling point and greater than the elevation value of the next sampling point, or if the elevation value of the non-endpoint sampling point is less than the elevation value of the previous sampling point and less than the elevation value of the next sampling point, then the non-endpoint sampling point is determined as the local extreme value sampling point. The left endpoint and the right endpoint of the cross-section line are determined as the endpoint sampling points.

4. The method for generating cross-sectional lines according to claim 2, characterized in that, The key point set generated based on the steep slope change sampling points, the local extreme value sampling points, and the endpoint sampling points includes: Generate a candidate key point set, wherein the candidate key point set includes the slope angle abrupt change sampling point, the local extreme value sampling point, and the endpoint sampling point; The Douglas-Puk algorithm is used to filter the candidate keypoint set to obtain the keypoint set.

5. The method for generating cross-sectional lines according to claim 1, characterized in that, Determining the tangent vector at the foot of the perpendicular includes: For the foot of the perpendicular that is not located at the end of the center line of the target object, the tangent vector at the foot of the perpendicular is determined by the following perturbation difference formula (1); (1); For the foot of the perpendicular located at the end of the center line of the target object, the tangent vector at the foot of the perpendicular is determined by the following perturbation difference formula (2); (2); in, Let the foot of the perpendicular from the i-th station among the plurality of station points to the center line of the target object be the perpendicular from the i-th station. For the foot The tangent vector at that point, The parametric curve function corresponding to the centerline of the target object. The point on the center line of the target object corresponds to the parameter value t, where the parameter value t belongs to the parameter domain of the parametric curve function, and each parameter value in the parameter domain of the parametric curve function corresponds one-to-one with a point on the center line of the target object. For the foot The corresponding parameter value in the parameter domain of the parametric curve function. is the preset perturbation parameter, and ∥·∥ is the Euclidean norm.

6. The method for generating cross-sectional lines according to claim 1, characterized in that, The step of determining the left endpoint and right endpoint of the cross-section line corresponding to the foot of the perpendicular along the left normal direction and its opposite direction includes: Along the left normal direction at the foot of the perpendicular, the left endpoint of the cross-section line corresponding to the foot of the perpendicular is determined by the following formula (3); (3); Along the left normal direction at the foot of the perpendicular, the right endpoint of the section line corresponding to the foot of the perpendicular is determined by the following formula (4); (4); in, Let the foot of the perpendicular from the i-th station among the plurality of station points be the center line of the target object. For the foot The left endpoint of the corresponding cross-section line, For the foot The right endpoint of the corresponding cross-section line, For the preset half-width of the cross-section, For the foot The left normal direction at the location, For the foot The opposite direction of the left normal at that location.

7. The method for generating cross-sectional lines according to claim 2, characterized in that, The method for generating cross-section lines also includes: Insert block references for each of the multiple sampling points; A strategy of starting and committing transactions in batches is adopted, and attribute writing is performed on all blocks in batches based on the sampling point data of the multiple sampling points.

8. The method for generating cross-sectional lines according to claim 2, characterized in that, The method for generating cross-section lines also includes: Based on a preset standardized data template, standardized cross-sectional data is generated; the standardized cross-sectional data includes the relative distances of at least some key points and the perpendiculars to the center line of the target object, as well as the elevation values ​​of the at least some key points and the perpendiculars.

9. The method for generating cross-sectional lines according to claim 2, characterized in that, The step of determining the sampling point data for each sampling point based on its planar coordinates and elevation values ​​includes: The path distance of each sampling point is determined based on the length of the target line, the sampling interval or number of samples of the equidistant sampling, and the ordinal number of each sampling point.

10. A cross-sectional line generating device, characterized in that, The cross-section line generating device includes: The data acquisition module is used to acquire the station point data of the centerline of the target object; the station point data includes the plane coordinate values ​​of multiple station points. The tangent determination module is used to determine the foot of the perpendicular from the station point to the center line of the target object, and to determine the tangent vector at the foot of the perpendicular. The left normal direction determination module is used to rotate the tangent vector at the foot of the perpendicular 90 degrees counterclockwise around the Z-axis to obtain the left normal direction at the foot of the perpendicular. The endpoint determination module is used to determine the left endpoint and right endpoint of the cross-section line corresponding to the foot of the perpendicular, respectively, along the left normal direction and its opposite direction at the foot of the perpendicular. The section line generation module is used to obtain multiple sampling points at equal intervals on the target line connecting the left end point and the right end point of the section line, obtain the elevation value of the sampling points from the digital elevation model according to the plane coordinate value of the sampling points, determine the key point set according to the plane coordinate value and elevation value of the multiple sampling points, and generate the section line of the target object corresponding to the station point based on the key point set.