Automatic drawing method and system applied to highway design
By constructing a combined gravitational and resistance field, highway routes are automatically generated, solving the problem of coordinating terrain and traffic data in traditional highway design, realizing the rationality and continuity of route planning, and improving design efficiency and output consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUZHOU GANDONG HIGHWAY DESIGNING INST
- Filing Date
- 2025-12-08
- Publication Date
- 2026-07-14
AI Technical Summary
Traditional highway design methods rely on human experience, making it difficult to efficiently coordinate terrain data and traffic flow information. This leads to inconsistent route planning, safety and economic risks, and is time-consuming, making it unsuitable for large-scale or complex projects.
By constructing a gravitational field and a resistance field, combining them into a comprehensive field, and using the K-means algorithm to cluster traffic flow, highway routes are generated. The routes are then smoothed using a Gaussian filtering algorithm, and highway design maps are automatically generated.
It achieves a unified expression of terrain constraints and traffic demands during the path generation process, improves the rationality and continuity of path planning, reduces errors caused by manual intervention, and improves design efficiency and output consistency.
Smart Images

Figure CN121637635B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design technology, and more specifically to an automated drawing method and system for highway design. Background Technology
[0002] In the field of highway design, traditional methods typically rely on the designer's experience and manual operation to plan routes and generate drawings. This process requires handling complex terrain data, traffic flow information, and other environmental factors, but due to a lack of systematic integrated analysis, designers often struggle to efficiently coordinate multiple data sources.
[0003] For example, changes in terrain slope and anticipated traffic distribution have a significant impact on route selection, but existing methods cannot automatically quantify the interaction of these factors, potentially causing route planning to overlook key constraints or optimization opportunities. Furthermore, manually adjusting design parameters can easily introduce inconsistencies, posing potential risks to the final solution in terms of safety and economy, and the entire process is time-consuming and unsuitable for large-scale or complex projects. Summary of the Invention
[0004] The purpose of this invention is to provide an automated drawing method and system for highway design, thereby solving the aforementioned technical problems.
[0005] The objective of this invention can be achieved through the following technical solutions: An automated drafting method applied to highway design includes the following steps: Obtain the starting point location, ending point location, terrain elevation data, and expected traffic flow; The gravitational field is calculated based on the starting point location, the ending point location, and the expected traffic flow; the drag field is calculated based on the terrain elevation data. The gravitational field and the drag field are combined into a comprehensive field; Starting from the starting position, a highway path is iteratively generated based on the comprehensive field until the ending position is reached; Highway design drawings are generated based on the highway route.
[0006] As a further aspect of the present invention: calculating the gravitational field includes: For position i on the map, calculate the Euclidean distance from position i to the starting position and the ending position, and denot them as the first distance A1 and the second distance A2, respectively. Calculate the basic gravitational value of position i fi = 1 / (A1+A2). Based on the expected traffic flow, the K-means algorithm is used to perform clustering to obtain multiple clusters, and the average expected traffic flow B of each cluster is calculated. Calculate the average value B' of the expected traffic flow average value B of multiple clusters, and denote the clusters whose expected traffic flow average value B is greater than the average value B' as high flow clusters; If the expected traffic flow corresponding to location i does not belong to the high-flow cluster, then the basic gravity value fi of location i is taken as the gravity value Fi of location i. If the expected traffic flow corresponding to location i belongs to the high-flow cluster, then the basic gravity value fi of location i is corrected to obtain the gravity value Fi of location i, and the calculation formula is as follows: ; Where η is a preset value; All locations and their corresponding gravitational values constitute the gravitational field.
[0007] As a further aspect of the present invention: the calculation of the drag field includes: For position i on the map, determine whether there is an adjacent position of position i in a preset direction. If there is, the adjacent position is taken as an adjacent position of position i. The preset direction includes east, south, west and north. Based on the terrain elevation data, the elevation values gj and Gi of adjacent positions j and i are obtained respectively, and the elevation difference Cij = gj - Gi between adjacent positions j and i is calculated; the horizontal distance Dij between adjacent positions j and i is calculated; and the slope ratio Pij = Cij / Dij between adjacent positions j and i is calculated. Obtain the slope ratio P with the largest absolute value among the slope ratios at location i, use the slope ratio P as the slope value of location i, and multiply the slope value by the preset correction coefficient to obtain the resistance value of location i. All locations and their corresponding resistance values constitute the resistance field.
[0008] As a further aspect of the present invention: combining the gravitational field and the drag field into a combined field includes: Obtain the gravitational value Fi and the drag value Zi at position i in the gravitational field and drag field respectively, and calculate the comprehensive value Hi = Fi - Zi at position i; The combined field consists of all positions and their corresponding combined field values; The composite field is smoothed by performing a Gaussian filtering algorithm on the composite value through convolution.
[0009] As a further aspect of the present invention: generating the highway path includes: Initialize the current position as the starting position, initialize the set of visited positions to an empty set, and add the current position to the set of visited positions; The adjacent positions of the current position are recorded as the target positions, and the first and second partial derivatives of the current position are calculated based on the target positions. The first partial derivative and the second partial derivative are concatenated to form a gradient vector. Based on the gradient vector, the main direction is determined, and the target position in the main direction is taken as a candidate point. If a candidate point exists on the map but is not in the set of visited locations, the candidate point is marked as a valid point; if a candidate point does not exist on the map or exists in the set of visited locations, the target location with the highest comprehensive value is selected as a valid point. Update the current position to the valid point, add the updated current position to the visited position set, and calculate the Euclidean distance L between the updated current position and the endpoint position. If L is less than a preset threshold, stop the iteration; otherwise, continue the iteration. When iteration stops, the sequence of all current locations in the visited location set arranged in chronological order constitutes the highway path.
[0010] As a further aspect of the present invention: calculating the first partial derivative and the second partial derivative includes: Obtain the target positions W1 and W2 in the east and west, respectively, and calculate the first partial derivative DY = (W1' - W2') of the current position, where W1' and W2' represent the combined values of the target positions W1 and W2, respectively. If W1 does not exist, then the first partial derivative DY = (W0' - W2'), where W0' represents the composite value at the current position; if W2 does not exist, then the first partial derivative DY = (W1' - W0'), where W0' represents the composite value at the current position; if neither W1 nor W2 exists, then the first partial derivative DY is 0. Obtain the target positions W3 and W4 in the south and north, respectively, and calculate the second partial derivative DE = (W4' - W3') of the current position, where W4' and W3' represent the combined values of the target positions W4 and W3, respectively. If W3 does not exist, then the second partial derivative DE = (W4' - W0'); if W4 does not exist, then the second partial derivative DE = (W0' - W3'), where W0' represents the composite value at the current position; if neither W1 nor W2 exists, then the second partial derivative DE is 0. Determining the main direction includes: If |DY|>|DE| and DY≥0, then the main direction is east; If |DY|>|DE| and DY<0, then the main direction is west; If |DY|≤|DE| and DE≥0, then the main direction is north; If |DY|≤|DE| and DE<0, then the main direction is south.
[0011] As a further aspect of the present invention: generating highway design drawings includes: The sequence is smoothed using a smoothing algorithm to obtain a smooth curve, which is denoted as the highway centerline. The width of the highway is determined based on design standards, wherein the design standards include the number of lanes and the lane width, and the width of the highway is obtained by multiplying the number of lanes by the lane width; The extension distance is calculated based on the road width, wherein the extension distance is half of the road width; For each point on the centerline of the highway, calculate the normal direction of the point, and offset the extended distance to both sides along the normal direction to obtain the left contour point and the right contour point. Connect all the left contour points to form the left contour line, and connect all the right contour points to form the right contour line. The area formed by the left contour line and the right contour line is denoted as the highway plane contour. For each point on the highway path, obtain the elevation points around the point from the terrain elevation data, and calculate the elevation value of the point using a linear interpolation algorithm; The output includes a highway design drawing containing the highway's horizontal profile and elevation information.
[0012] Automated drafting systems for highway design include: Data acquisition module: Acquires starting point location, ending point location, terrain elevation data, and expected traffic flow; Processing module: Calculates the gravitational field based on the starting point location, the ending point location, and the expected traffic flow; calculates the resistance field based on the terrain elevation data; The gravitational field and the drag field are combined into a comprehensive field; Optimization module: Starting from the starting position, iteratively generate a highway path based on the comprehensive field until the ending position is reached; Highway design drawings are generated based on the highway route.
[0013] The beneficial effects of this invention compared to the prior art are as follows: This invention constructs a comprehensive field for route planning, achieving a unified expression of multi-source information such as starting and ending points, terrain changes, and traffic distribution. This allows the route generation process to automatically reflect the combined impact of terrain constraints and traffic demand. By performing iterative pathfinding within the comprehensive field, route generation no longer relies on manual experience and can automatically tend towards a better route based on field changes, improving the rationality and continuity of route planning. During the iteration process, this method automatically handles direction selection, route coherence, and local conflicts, making the generated route more consistent with actual terrain conditions and maintaining an optimized overall orientation. Subsequently, by smoothing the obtained route and constructing centerlines and left and right contour lines, a planar design result conforming to operational standards can be automatically generated. Automatic interpolation of route elevations using terrain elevation data ensures that the final design drawing simultaneously reflects both planar contours and longitudinal elevation information, thereby reducing the workload of manual drawing and proofreading and improving the consistency and reliability of design output. Overall, this invention automates the entire highway design process from data processing and route generation to drawing output, effectively improving design efficiency and reducing errors caused by human intervention. Attached Figure Description
[0014] The invention will now be further described with reference to the accompanying drawings.
[0015] Figure 1 This is a flowchart illustrating the automated drawing method of the present invention applied to highway design. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Please see Figure 1 As shown, the present invention is an automated drawing method applied to highway design, comprising the following steps: Obtain the starting point location, ending point location, terrain elevation data, and expected traffic flow; Specifically, the process of acquiring the starting point, ending point, terrain elevation data, and expected traffic flow is based on spatial data acquisition and attribute data extraction. The entire process begins with establishing the data source by selecting two geographically significant points from the map data source as the starting and ending points for route planning. These points are typically determined by inputting coordinate values or selecting corresponding locations on an electronic map.
[0018] The acquisition of topographic elevation data relies on existing topographic databases. The planning area is divided into several location units, and the corresponding elevation values are extracted from the elevation dataset according to the spatial range of each location unit. The elevation values are then associated with each location unit. To enable subsequent resistance value calculations, it is necessary to ensure that the elevation data has a consistent spatial distribution, so that corresponding elevation information can be found at each location.
[0019] The acquisition of expected traffic flow data is based on the estimation of traffic demand within the planning area. Through the analysis of the current road conditions, the layout of surrounding facilities, or historical traffic statistics, traffic demand is allocated to each location unit in numerical or hierarchical form. The specific methods are not limited and are conventional techniques for those skilled in the art.
[0020] The gravitational field is calculated based on the starting point location, the ending point location, and the expected traffic flow; the drag field is calculated based on the terrain elevation data. In a preferred embodiment of the present invention, calculating the gravitational field includes: For position i on the map, calculate the Euclidean distance from position i to the starting position and the ending position, and denot them as the first distance A1 and the second distance A2, respectively. Calculate the basic gravitational value of position i fi = 1 / (A1+A2). Based on the expected traffic flow, the K-means algorithm is used to perform clustering to obtain multiple clusters, and the average expected traffic flow B of each cluster is calculated. Calculate the average value B' of the expected traffic flow average value B of multiple clusters, and denote the clusters whose expected traffic flow average value B is greater than the average value B' as high flow clusters; If the expected traffic flow corresponding to location i does not belong to the high-flow cluster, then the basic gravity value fi of location i is taken as the gravity value Fi of location i. If the expected traffic flow corresponding to location i belongs to the high-flow cluster, then the basic gravity value fi of location i is corrected to obtain the gravity value Fi of location i, and the calculation formula is as follows: ; Where η is a preset value; All locations and their corresponding gravitational values constitute the gravitational field.
[0021] It should be noted that the process of acquiring the gravitational field is based on the fundamental logic that spatial proximity and traffic demand intensity jointly influence path attractiveness. By calculating the distance to the starting and ending points at each location, a distribution relationship can be formed in geographic space where the attraction increases with proximity to the target point. This relationship can maintain a gradual change across consecutive locations, causing the path to converge towards the two target points in an overall trend. The reciprocal of distance, as the basis for fundamental gravity, reflects the guiding role of proximity in route selection. Its essence is to construct a quantity indicating direction using spatial geometry. To ensure that gravity reflects not only spatial factors but also traffic demand within a region, expected traffic flow is divided according to location clustering, allowing for more stable identification of flow differences. Then, by determining whether a location belongs to a high-flow cluster, this is superimposed with the fundamental gravity to form a gravity intensity that better meets traffic usage requirements. Spatial proximity and traffic demand information are respectively transformed into attractiveness values that can be compared on the same scale, so that route planning, in local selection, is driven not only by the geometric relationship of the target location but also by the enhancement of traffic value. Once the gravitational field is formed, the gravitational intensity at each location in space can reflect its attraction to the path, enabling the subsequent path generation stage to automatically identify more suitable areas to pass through in the comprehensive field. This strengthens the approach behavior to the target direction and traffic demand throughout the planning process, and constructs a continuous and traffic-rational route trend.
[0022] In another preferred embodiment of the present invention, the calculation of the drag field includes: For position i on the map, determine whether there is an adjacent position of position i in a preset direction. If there is, the adjacent position is taken as an adjacent position of position i. The preset direction includes east, south, west and north. Based on the terrain elevation data, the elevation values gj and Gi of adjacent positions j and i are obtained respectively, and the elevation difference Cij = gj - Gi between adjacent positions j and i is calculated; the horizontal distance Dij between adjacent positions j and i is calculated; and the slope ratio Pij = Cij / Dij between adjacent positions j and i is calculated. Obtain the slope ratio P with the largest absolute value among the slope ratios at location i, use the slope ratio P as the slope value of location i, and multiply the slope value by the preset correction coefficient to obtain the resistance value of location i. All locations and their corresponding resistance values constitute the resistance field.
[0023] Understandably, the formation of the resistance field is based on the objective law that terrain imposes practical limitations on road construction. By analyzing the elevation difference and horizontal distance between a location and its adjacent locations, terrain undulations can be transformed into slope ratios reflecting the steepness of the terrain. This allows each location in space to express the construction difficulty through changes in its surrounding terrain. When a location extends in different directions, the terrain changes may be significantly uneven, with the slope in one direction often being much greater than in others. Taking the portion with the largest absolute value of the slope ratio as the slope value for that location ensures that the most unfavorable direction in the terrain is reflected in the resistance calculation. This approach aligns with the logic in engineering construction where feasibility is determined by the most unfavorable conditions. The slope values generated through this extraction method accurately map the severity of the terrain to the resistance values, ensuring that subsequent path generation avoids steep sections in the overall trend. After being converted by a correction coefficient, the slope values become resistance values, forming a resistance distribution covering the entire space. This allows the comprehensive field to identify the limiting effect of the terrain during calculation, thus naturally causing the path to move away from locations with high construction difficulty during the iteration process. This method of expressing resistance allows the criteria for route selection to not only rely on traffic demand, but also fully reflect the limitations of terrain on traffic capacity in local areas, making the final route more closely aligned with the feasibility requirements of actual engineering projects.
[0024] The gravitational field and the drag field are combined into a comprehensive field; In another preferred embodiment of the present invention, combining the gravitational field and the drag field into a combined field includes: Obtain the gravitational value Fi and the drag value Zi at position i in the gravitational field and drag field respectively, and calculate the comprehensive value Hi = Fi - Zi at position i; The combined field consists of all positions and their corresponding combined field values; The composite field is smoothed by performing a Gaussian filtering algorithm on the composite value through convolution.
[0025] It is worth noting that the formation of the comprehensive field is based on the idea of unifying path attraction and avoidance factors into a single evaluation system. By algebraically combining the attraction and resistance values at each location, the overall impact of that location on the path can be represented by a single numerical value. This allows subsequent path generation to directly iterate based on the comprehensive changing trends. The attraction value reflects the positive driving force of the path towards traffic demand and the target location, while the resistance value reflects the constraints imposed by terrain conditions. Subtracting the two integrates favorable and unfavorable information, making different types of data comparable on the same scale, thus avoiding the problem of a lack of unified balancing standards among factors during the path generation stage. After constructing these comprehensive values into a spatial distribution, a numerical field that can continuously express regional advantages and differences can be formed, providing a necessary basis for judging gradient direction and allowing the path to perceive subtle differences between regions during local selection. This ensures that the path is not merely attracted or repelled by a single factor, but rather seeks a trend that balances accessibility and constructibility under the combined influence of multiple factors. The reason for smoothing the composite field is that regional data usually has local discontinuities. Smoothing can eliminate abnormal fluctuations caused by noise, make the changes of the composite value in space more consistent, make the judgment of gradient direction more stable, and thus make the path generation process have a smoother trend, making the final route more natural and continuous.
[0026] Starting from the starting position, a highway path is iteratively generated based on the comprehensive field until the ending position is reached; In a preferred embodiment of the present invention, generating the highway path includes: Initialize the current position as the starting position, initialize the set of visited positions to an empty set, and add the current position to the set of visited positions; The adjacent positions of the current position are recorded as the target positions, and the first and second partial derivatives of the current position are calculated based on the target positions. The first partial derivative and the second partial derivative are concatenated to form a gradient vector. Based on the gradient vector, the main direction is determined, and the target position in the main direction is taken as a candidate point. If a candidate point exists on the map but is not in the set of visited locations, the candidate point is marked as a valid point; if a candidate point does not exist on the map or exists in the set of visited locations, the target location with the highest comprehensive value is selected as a valid point. Update the current position to the valid point, add the updated current position to the visited position set, and calculate the Euclidean distance L between the updated current position and the endpoint position. If L is less than a preset threshold, stop the iteration; otherwise, continue the iteration. When iteration stops, the sequence of all current locations in the visited location set arranged in chronological order constitutes the highway path.
[0027] In a preferred embodiment, calculating the first partial derivative and the second partial derivative includes: Obtain the target positions W1 and W2 in the east and west, respectively, and calculate the first partial derivative DY = (W1' - W2') of the current position, where W1' and W2' represent the combined values of the target positions W1 and W2, respectively. If W1 does not exist, then the first partial derivative DY = (W0' - W2'), where W0' represents the composite value at the current position; if W2 does not exist, then the first partial derivative DY = (W1' - W0'), where W0' represents the composite value at the current position; if neither W1 nor W2 exists, then the first partial derivative DY is 0. Obtain the target positions W3 and W4 in the south and north, respectively, and calculate the second partial derivative DE = (W4' - W3') of the current position, where W4' and W3' represent the combined values of the target positions W4 and W3, respectively. If W3 does not exist, then the second partial derivative DE = (W4' - W0'); if W4 does not exist, then the second partial derivative DE = (W0' - W3'), where W0' represents the composite value at the current position; if neither W1 nor W2 exists, then the second partial derivative DE is 0. Determining the main direction includes: If |DY|>|DE| and DY≥0, then the main direction is east; If |DY|>|DE| and DY<0, then the main direction is west; If |DY|≤|DE| and DE≥0, then the main direction is north; If |DY|≤|DE| and DE<0, then the main direction is south.
[0028] It should be noted that the path generation process uses local gradients to determine the next direction of movement. The principle is that the change in the comprehensive field can reflect the directionality of the location's advantages and disadvantages. By comparing the difference in the comprehensive value of the current location in different directions, the direction with the largest increase in comprehensive value can be obtained. This direction corresponds to the area where the path is more advantageous. Therefore, using this as the main direction can make the path move along the direction that best matches the comprehensive judgment.
[0029] The first partial derivative is constructed by comparing the combined values of the East and West because the difference between adjacent positions can directly reflect the upward trend of the combined value in that direction. When there is no available position on a certain side, the combined value of the current position is used to replace the missing value in order to avoid the direction calculation failing, while maintaining the comparison with the changes in the neighborhood, so that the partial derivative can still express the trend of the change in direction.
[0030] When the partial derivative calculation in the north-south direction encounters a missing position, it is handled in the same way to ensure the continuity of the partial derivative calculation and prevent errors in direction determination due to missing boundaries.
[0031] The principle of concatenating two partial derivatives into a gradient vector is that the change in the comprehensive value in two-dimensional space is essentially determined by these two directions. By comparing the changes in the two directions, we can determine the direction of maximum increase of the comprehensive value in space. This direction has the strongest guiding significance. Therefore, taking the adjacent positions of the corresponding directions as candidate points can ensure that the path always moves towards the region with a better comprehensive field, avoiding directional deviation or lingering in the suboptimal region.
[0032] When candidate points are unavailable, the neighboring point with the highest comprehensive value is used as the valid point. This ensures that the path continues to move towards a position with a higher comprehensive value even when it cannot proceed along the optimal gradient direction, thus avoiding dead ends or loops. Continuously iterating and updating the current position and recording visited points allows the entire path to accumulate from continuous locally optimal decisions. The principle behind this process is that the comprehensive field exhibits a smooth changing trend in space, and the continuous selection of local upward directions guides the path to gradually approach a more optimal spatial region. The final path is composed of these continuous positions, giving the route a tendency to continuously converge towards the comprehensive advantage. This allows the final generated path to naturally form based on the changing laws of the comprehensive field, reflecting both terrain constraints and traffic attraction, thus maintaining the computability, consistency, and engineering rationality of the entire path planning process.
[0033] Highway design drawings are generated based on the highway route.
[0034] In a preferred embodiment of the present invention, generating highway design drawings includes: The sequence is smoothed using a smoothing algorithm to obtain a smooth curve, which is denoted as the highway centerline. The width of the highway is determined based on design standards, wherein the design standards include the number of lanes and the lane width, and the width of the highway is obtained by multiplying the number of lanes by the lane width; The extension distance is calculated based on the road width, wherein the extension distance is half of the road width; For each point on the centerline of the highway, calculate the normal direction of the point, and offset the extended distance to both sides along the normal direction to obtain the left contour point and the right contour point. Connect all the left contour points to form the left contour line, and connect all the right contour points to form the right contour line. The area formed by the left contour line and the right contour line is denoted as the highway plane contour. For each point on the highway path, obtain the elevation points around the point from the terrain elevation data, and calculate the elevation value of the point using a linear interpolation algorithm; The output includes a highway design drawing containing the highway plan outline and elevation information. It should be noted that the process of generating highway design drawings is based on the premise that the path sequence accurately reflects the route orientation. By smoothing this sequence, the path changes are made more continuous, thus providing a stable central reference for the subsequently generated geometric structure. The principle of using a smooth curve as the centerline is that the highway alignment needs to have continuously expressible directional changes. Only a smooth centerline can maintain a unified spatial characteristic during geometric construction. Once the centerline is determined, the overall width is determined based on design standards, giving the route a clear dimensional basis in its lateral structure. Converting the width into an extension distance allows the lateral contour to be formed equidistantly on both sides of the centerline, ensuring the centerline is symmetrical throughout the cross-section. By calculating the normal direction at each centerline point and offsetting by an extension distance along the normal direction, complete left and right boundaries can be generated without changing the centerline orientation. This process utilizes the differential properties of curves to ensure that the lateral boundaries maintain a consistent geometric relationship as the centerline changes, allowing the planar contour to naturally conform to the route shape. After completing the planar structure, the elevations of each point along the route are interpolated. This is because elevation data is discrete, and it's necessary to find an elevation that reflects the actual terrain based on the centerline position in the surrounding area, ensuring a correspondence between the planar position and vertical information. Finally, the planar outline and elevation data are output simultaneously, presenting both planar and elevation information in the same graphic. This unified expression of the route's horizontal position and vertical characteristics ensures the completeness of the highway's geometric information, facilitating subsequent design work.
[0035] This scheme constructs a comprehensive field by simultaneously utilizing gravitational and resistance fields during the same path generation process. By leveraging the gradient changes of this comprehensive field to guide path iteration, path planning within the same framework can simultaneously gravitate towards areas of high traffic demand and avoid unfavorable terrain, achieving a combined effect that traditional methods struggle to achieve. The gravitational field allows the path to naturally align with the starting and ending points in space, generating a stronger attraction in areas with high traffic demand. The resistance field numerically represents steep terrain, allowing unfavorable terrain to influence the path's adjustment direction. The comprehensive field merges these two elements into a unified evaluation criterion, enabling the path to continuously perceive the combined effects of terrain and traffic during local selection, gradually forming an overall trend along a gradient-based ascent. Paths obtained in this way can automatically develop a direction that balances traffic value and engineering feasibility through continuous iteration, allowing the entire path to simultaneously meet accessibility requirements and terrain constraints without relying on manual adjustments.
[0036] This solution quantifies multiple design factors as fields and unifies their expression within a comprehensive field, freeing path generation from the limitations of relying on human experience and manual adjustments in previous technologies. Traditional methods struggle to establish a precise correlation between terrain undulations and traffic demand. This solution uses a gravitational field to express the attraction of traffic demand and a resistance field to express the construction difficulties brought about by terrain conditions, forming a directly comparable single value within the comprehensive field. This allows the system to directly assess the relative advantages and disadvantages of each location under the combined influence of multiple factors. Path generation iterates based on the changing trend of the comprehensive value, allowing the path to naturally advance along areas with higher comprehensive values without human intervention. This avoids the problem of overlooking local terrain risks during manual path selection and prevents insufficient traffic function caused by optimizing solely based on terrain. Finally, combining planar contour generation and elevation interpolation, the generated highway design drawing possesses both lateral and longitudinal geometric information, reducing repetitive manual drawing and proofreading. This automates the entire design process from data processing to drawing output, fundamentally solving the problems of difficulty in coordinating multiple data sources, instability in human judgment, and low design efficiency.
[0037] Automated drafting systems for highway design include: Data acquisition module: Acquires starting point location, ending point location, terrain elevation data, and expected traffic flow; Processing module: Calculates the gravitational field based on the starting point location, the ending point location, and the expected traffic flow; calculates the resistance field based on the terrain elevation data; The gravitational field and the drag field are combined into a comprehensive field; Optimization module: Starting from the starting position, iteratively generate a highway path based on the comprehensive field until the ending position is reached; Highway design drawings are generated based on the highway route.
[0038] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.
Claims
1. An automated drafting method applied to highway design, characterized in that, Includes the following steps: Obtain the starting point location, ending point location, terrain elevation data, and expected traffic flow; The gravitational field is calculated based on the starting point location, the ending point location, and the expected traffic flow; the drag field is calculated based on the terrain elevation data. The gravitational field and the drag field are combined into a comprehensive field; Starting from the starting position, a highway path is iteratively generated based on the comprehensive field until the ending position is reached; A highway design drawing is generated based on the highway route; Calculating the gravitational field includes: For position i on the map, calculate the Euclidean distance from position i to the starting position and the ending position, and denot them as the first distance A1 and the second distance A2, respectively. Calculate the basic gravitational value of position i fi = 1 / (A1+A2). Based on the expected traffic flow, the K-means algorithm is used to perform clustering to obtain multiple clusters, and the average expected traffic flow B of each cluster is calculated. Calculate the average value B' of the expected traffic flow average value B of multiple clusters, and denote the clusters whose expected traffic flow average value B is greater than the average value B' as high flow clusters; If the expected traffic flow corresponding to location i does not belong to the high-flow cluster, then the basic gravity value fi of location i is taken as the gravity value Fi of location i. If the expected traffic flow corresponding to location i belongs to the high-flow cluster, then the basic gravity value fi of location i is corrected to obtain the gravity value Fi of location i, and the calculation formula is as follows: ; Where η is a preset value; All locations and their corresponding gravitational values constitute the gravitational field; The calculation of the drag field includes: For position i on the map, determine whether there is an adjacent position of position i in a preset direction. If there is, the adjacent position is taken as an adjacent position of position i. The preset direction includes east, south, west and north. Based on the terrain elevation data, the elevation values gj and Gi of adjacent positions j and i are obtained respectively, and the elevation difference Cij = gj - Gi between adjacent positions j and i is calculated; the horizontal distance Dij between adjacent positions j and i is calculated; and the slope ratio Pij = Cij / Dij between adjacent positions j and i is calculated. Obtain the slope ratio P with the largest absolute value among the slope ratios at location i, use the slope ratio P as the slope value of location i, and multiply the slope value by the preset correction coefficient to obtain the resistance value of location i. All locations and their corresponding resistance values constitute the resistance field.
2. The automated drawing method for highway design according to claim 1, characterized in that, Combining the gravitational field and the drag field into a combined field includes: Obtain the gravitational value Fi and the drag value Zi at position i in the gravitational field and drag field respectively, and calculate the comprehensive value Hi = Fi - Zi at position i; The combined field consists of all positions and their corresponding combined field values; The composite field is smoothed by performing a Gaussian filtering algorithm on the composite value through convolution.
3. The automated drawing method for highway design according to claim 1, characterized in that, Generating the highway path includes: Initialize the current position as the starting position, initialize the set of visited positions to an empty set, and add the current position to the set of visited positions; The adjacent positions of the current position are recorded as the target positions, and the first and second partial derivatives of the current position are calculated based on the target positions. The first partial derivative and the second partial derivative are concatenated to form a gradient vector. Based on the gradient vector, the main direction is determined, and the target position in the main direction is taken as a candidate point. If a candidate point exists on the map but is not in the set of visited locations, the candidate point is marked as a valid point; if a candidate point does not exist on the map or exists in the set of visited locations, the target location with the highest comprehensive value is selected as a valid point. Update the current position to the valid point, add the updated current position to the visited position set, and calculate the Euclidean distance L between the updated current position and the endpoint position. If L is less than a preset threshold, stop the iteration; otherwise, continue the iteration. When iteration stops, the sequence of all current locations in the visited location set arranged in chronological order constitutes the highway path.
4. The automated drawing method for highway design according to claim 3, characterized in that, The calculation of the first and second partial derivatives includes: Obtain the target positions W1 and W2 in the east and west, respectively, and calculate the first partial derivative DY = (W1' - W2') of the current position, where W1' and W2' represent the combined values of the target positions W1 and W2, respectively. If W1 does not exist, then the first partial derivative DY = (W0' - W2'), where W0' represents the composite value at the current position; if W2 does not exist, then the first partial derivative DY = (W1' - W0'), where W0' represents the composite value at the current position; if neither W1 nor W2 exists, then the first partial derivative DY is 0. Obtain the target positions W3 and W4 in the south and north, respectively, and calculate the second partial derivative DE = (W4' - W3') of the current position, where W4' and W3' represent the combined values of the target positions W4 and W3, respectively. If W3 does not exist, then the second partial derivative DE = (W4' - W0'); if W4 does not exist, then the second partial derivative DE = (W0' - W3'), where W0' represents the composite value at the current position; if neither W1 nor W2 exists, then the second partial derivative DE is 0. Determining the main direction includes: If |DY|>|DE| and DY≥0, then the main direction is east; If |DY|>|DE| and DY<0, then the main direction is west; If |DY|≤|DE| and DE≥0, then the main direction is north; If |DY|≤|DE| and DE<0, then the main direction is south.
5. The automated drawing method for highway design according to claim 4, characterized in that, Generating highway design drawings includes: The sequence is smoothed using a smoothing algorithm to obtain a smooth curve, which is denoted as the highway centerline. The width of the highway is determined based on design standards, wherein the design standards include the number of lanes and the lane width, and the width of the highway is obtained by multiplying the number of lanes by the lane width; The extension distance is calculated based on the road width, wherein the extension distance is half of the road width; For each point on the centerline of the highway, calculate the normal direction of the point, and offset the extended distance to both sides along the normal direction to obtain the left contour point and the right contour point. Connect all the left contour points to form the left contour line, and connect all the right contour points to form the right contour line. The area formed by the left contour line and the right contour line is denoted as the highway plane contour. For each point on the highway path, obtain the elevation points around the point from the terrain elevation data, and calculate the elevation value of the point using a linear interpolation algorithm; The output includes a highway design drawing containing the highway's horizontal profile and elevation information.
6. An automated drafting system for highway design, characterized in that, include: Data acquisition module: Acquires starting point location, ending point location, terrain elevation data, and expected traffic flow; Processing module: Calculates the gravitational field based on the starting point location, the ending point location, and the expected traffic flow; calculates the resistance field based on the terrain elevation data; The gravitational field and the drag field are combined into a comprehensive field; Optimization module: Starting from the starting position, iteratively generate a highway path based on the comprehensive field until the ending position is reached; A highway design drawing is generated based on the highway route; Calculating the gravitational field includes: For position i on the map, calculate the Euclidean distance from position i to the starting position and the ending position, and denot them as the first distance A1 and the second distance A2, respectively. Calculate the basic gravitational value of position i fi = 1 / (A1+A2). Based on the expected traffic flow, the K-means algorithm is used to perform clustering to obtain multiple clusters, and the average expected traffic flow B of each cluster is calculated. Calculate the average value B' of the expected traffic flow average value B of multiple clusters, and denote the clusters whose expected traffic flow average value B is greater than the average value B' as high flow clusters; If the expected traffic flow corresponding to location i does not belong to the high-flow cluster, then the basic gravity value fi of location i is taken as the gravity value Fi of location i. If the expected traffic flow corresponding to location i belongs to the high-flow cluster, then the basic gravity value fi of location i is corrected to obtain the gravity value Fi of location i, and the calculation formula is as follows: ; Where η is a preset value; All locations and their corresponding gravitational values constitute the gravitational field; The calculation of the drag field includes: For position i on the map, determine whether there is an adjacent position of position i in a preset direction. If there is, the adjacent position is taken as an adjacent position of position i. The preset direction includes east, south, west and north. Based on the terrain elevation data, the elevation values gj and Gi of adjacent positions j and i are obtained respectively, and the elevation difference Cij = gj - Gi between adjacent positions j and i is calculated; the horizontal distance Dij between adjacent positions j and i is calculated; and the slope ratio Pij = Cij / Dij between adjacent positions j and i is calculated. Obtain the slope ratio P with the largest absolute value among the slope ratios at location i, use the slope ratio P as the slope value of location i, and multiply the slope value by the preset correction coefficient to obtain the resistance value of location i. All locations and their corresponding resistance values constitute the resistance field.