Rapid contour line generation method for mass ASC elevation data
Through deep learning and parallel computing technology, the problem of inefficient contour generation efficiency of massive ASC elevation data is solved, and the accurate extraction and efficient generation of different terrain elements are achieved. The generated contour lines more accurately reflect the actual terrain and meet the needs of geographic information systems, urban planning and water conservancy engineering.
Patent Information
- Application Number
- CN202510589043.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-25
AI Technical Summary
When processing massive ASC elevation data, the existing contour generation method lacks consideration of the differences and terrain similarity between different terrain elements, resulting in low computational efficiency. The consistency and accuracy of the generated contours among different similar areas are insufficient, which cannot meet the needs of fast and efficient generation of high-quality contours.
Deep learning technology is used to train semantic segmentation models, collect ASC elevation data samples of different terrain elements and mark them, and through multiple iterative training and parameter adjustment, a terrain similarity measurement model is established, parallel computing technology is used to improve processing efficiency, and differentiated contour generation strategies and parameters are formulated for different terrain elements, combining contour integration and optimization processing.
The precise extraction and contour generation of different terrain elements is realized, the quality and practicality of contours is improved, the actual terrain situation can be more accurately reflected, and the generation efficiency is greatly improved through parallel calculations to meet the rapid processing needs of practical applications.
Smart Images

Figure CN120374878A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terrain data processing, and specifically to a method for quickly generating contour lines from a large amount of ASC elevation data. Background Art
[0002] In the current era of rapid digital and information development, the demand for accurate and efficient terrain data processing in many fields such as geographic information systems (GIS), urban planning, geological exploration, and water conservancy projects is becoming increasingly urgent. As an important foundation for these fields to carry out research, make decisions, and plan projects, the accuracy and integrity of terrain data directly affect the quality and effectiveness of related work. Contour lines, as a key means to visually represent terrain undulations, can clearly express information such as terrain slope, aspect, and terrain change, and play an irreplaceable role in terrain analysis, engineering design, and resource management. With the continuous innovation of geographic data acquisition technology, a large amount of ASC elevation data can be quickly obtained. As a common elevation data storage format, the ASC format can record surface elevation information in a concise manner, providing a rich data source for terrain analysis.
[0003] Most of the existing contour line generation methods are based on simple elevation data processing processes, lacking in-depth consideration of terrain element differences and terrain similarity characteristics, and having many deficiencies. On the one hand, when processing different terrain areas, these methods often adopt a unified generation strategy and fail to fully recognize the impact of different terrain elements (such as forests, farmlands, water areas, etc.) on contour line generation. On the other hand, for areas with similar terrain characteristics, traditional methods fail to effectively utilize existing processing results to improve contour line generation efficiency. When processing a large amount of ASC elevation data, traditional methods usually independently process each data area and repeatedly calculate data for similar terrain areas, resulting in low computational efficiency and long processing time. At the same time, due to the lack of a terrain similarity measurement mechanism, traditional methods are difficult to ensure the consistency and accuracy of the generated contour lines between different similar areas and cannot meet the actual application requirements for quickly and efficiently generating high-quality contour lines. Summary of the Invention
[0004] The object of the present invention is to make up for the deficiencies of the prior art and provide a method for quickly generating contour lines from a large amount of ASC elevation data. It can train a semantic segmentation model by applying deep learning technology, collect ASC elevation data samples containing different terrain elements and perform detailed annotation, build a semantic segmentation model architecture, and through multiple iterations of training and parameter adjustment, enable the model to accurately extract terrain elements from ASC elevation data. In the stage of determining the contour line generation strategy, for different terrain elements such as water areas, forests, and farmlands, relevant data are collected respectively and their characteristics are analyzed, and differential contour line generation strategies and parameters are formulated. In the process of generating contour lines, the processed data and new data are divided into small regions, eigenvalue is calculated and a terrain similarity measurement model is established, and the contour lines of similar regions are quickly generated by using terrain similarity. For the parts where there are no similar regions to draw on, they are generated according to the determined strategies and parameters, and parallel computing technology is used to improve the processing efficiency. Finally, the generated contour lines are integrated and optimized, and smoothed processing is carried out, and the contour line accuracy is adjusted according to actual needs, effectively solving the defects of traditional methods and providing more accurate and efficient terrain data support for fields such as geographic information systems, urban planning, geological exploration, and water conservancy projects
[0005] To solve the above technical problems, the present invention provides the following technical solution: A method for quickly generating contour lines from a large amount of ASC elevation data, the method comprising the following specific steps:
[0006] Data preprocessing: After obtaining a large amount of ASC elevation data, perform format conversion, remove noise and outliers, and adjust the data to a suitable range through normalization;
[0007] Semantic segmentation model training: Collect ASC elevation data samples containing different terrain elements and annotate them, build a model through a deep learning framework, and divide the sample set for training. Build a model through a deep learning framework, use the cross-entropy loss function to measure the difference between the model prediction result and the true label, and adjust the model parameters accordingly;
[0008] Terrain element extraction: Input the preprocessed large amount of ASC elevation data into the trained semantic segmentation model, and organize the output results to accurately extract different terrain elements;
[0009] Determination of contour line generation strategy: For different terrain elements, determine the corresponding contour line generation strategies and parameters respectively. For water areas, combine water level data to determine the elevation adjustment strategy and parameters. For forest areas, comprehensively consider vegetation data to determine the elevation fine-tuning strategy and parameters. Set appropriate parameters for generating contour lines of farmlands based on relevant farmland data;
[0010] Contour generation: Divide the new terrain data and the processed data into small regions and calculate the characteristic values. Find the similar parts by calculating the similarity degree between regions and generate contours by referring to them. For the parts without similarity, process them separately according to the terrain element generation strategy;
[0011] Contour integration and optimization: Merge the contours generated by different terrain elements, remove the duplicate and unreasonable parts, smooth the contours by spline interpolation, and adjust the accuracy according to the actual needs to conform to the actual terrain situation.
[0012] Furthermore, in the training steps of the semantic segmentation model, build the model through a deep learning framework, use the cross-entropy loss function to measure the difference between the model prediction result and the true label, and adjust the model parameters accordingly. The cross-entropy loss function is: , where is the loss function value, used to measure the difference between the model prediction result and the true label. The smaller the value, the more accurate the model prediction. is the number of samples, that is, the total number of ASC elevation data samples participating in the training. is the sample index, and its value range is from 1 to , used to traverse each sample. is the class index, and its value range is from 1 to , used to traverse each terrain element class. is the total number of terrain element classes. represents the true label that the th sample belongs to the th class of terrain elements. If it belongs, then , otherwise . represents the probability value that the model predicts the th sample belongs to the th class of terrain elements, and its value range is between [0,1].
[0013] Even further, in the step of determining the contour generation strategy, for different terrain elements, determine the corresponding contour generation strategies and parameters respectively. For the water area, collect the real-time water level data and historical water level change data recorded by the water level monitoring equipment, analyze the amplitude and frequency characteristics of the water level change, and determine the adjustment method of the water area elevation data when generating contours according to these characteristics. For the forest area, comprehensively utilize the high-resolution remote sensing image data and the vegetation height data measured on the spot, analyze the distribution and height of the vegetation, and determine to consider the vegetation height factor when generating contours so as to determine the corresponding fine-tuning strategies and parameters. For the farmland area, collect the land use planning data and irrigation facility layout data of the farmland, and combine the flatness of the farmland to set appropriate contour elevation values to accurately represent the farmland terrain.
[0014] Furthermore, in the contour generation strategy determination step, for the water area, according to these features, the adjustment method of the elevation data of the water area when generating contours is determined, and its adjustment formula is: , where is the adjusted elevation value of the water area, is the original elevation value of the water area, is the water level change value, is the adjustment coefficient. For the forest area, it is determined to consider the vegetation height factor when generating contours, so as to determine the corresponding fine-tuning strategy and parameters, and its adjustment formula is: , where is the adjusted elevation value of the forest area, is the original elevation value of the forest area, is the vegetation height value, is the fine-tuning coefficient. For the farmland area, collect the land use planning data and irrigation facility layout data of the farmland, and combine the leveling degree of the farmland to set the appropriate contour elevation value. Its calculation formula is: , where is the adjusted elevation value of the farmland area, is the original elevation value of the farmland area, is the elevation change value caused by irrigation, is the irrigation influence coefficient, is the slope correction value according to the farmland slope and land leveling plan.
[0015] Furthermore, in the contour generation step, when processing new terrain data, divide the processed ASC elevation data and the new terrain data into several small areas of the same size. For each small area, calculate the area ratio, average elevation value, and elevation fluctuation degree of different terrain elements respectively. According to these characteristic values, calculate the similarity degree between the small area of the processed data and the small area of the new data, establish a terrain similarity measurement model. Through the terrain similarity measurement model, find out the part of the new terrain data with a higher similarity degree to the processed terrain area, directly draw on the parameters and results of the contours generated in the similar area, and make adjustments according to the subtle differences in the distribution of terrain elements, elevation, etc. between the new area and the similar area, so as to quickly generate the contours of the similar part in the new area. For the part of the new terrain data that has no similar area to draw on, according to the determined contour generation strategies and parameters for different terrain elements, perform contour generation operations on the extracted different terrain elements respectively. By processing the elevation data of each terrain element in logical order, the corresponding contours are generated.
[0016] Furthermore, in the contour generation step, a terrain similarity measurement model is established. Through the terrain similarity measurement model, the parts in the new terrain data that are highly similar to the processed terrain areas are found. The model formula is: , where represents the similarity measurement value between two small regions, The smaller the value, the more similar the two regions are. is the number of eigenvalue, is the feature index, and its value range is from 1 to , which is used to traverse each eigenvalue. represents the -th eigenvalue of the processed data small region, represents the -th eigenvalue of the new data small region, corresponding to the same type of feature as , and are obtained by performing feature calculations on the processed ASC elevation data small region and the new ASC elevation data small region respectively.
[0017] Furthermore, in the contour generation step, for the parts in the new terrain data that have no similar regions to refer to, according to the determined contour generation strategies and parameters for different terrain elements, contour generation operations are respectively performed on the extracted different terrain elements. Specifically, for the general terrain area, assume that the data points are stored in a two-dimensional matrix , where represents the elevation value of the data point at the -th row and the -th column. The contour interval is , and the current contour elevation is . For four adjacent data points , , , , according to the bilinear interpolation method, determine the position of the quadrilateral formed by the contour passing through these four points. Assume is the planar coordinate (x_{i},y_{j}) of the point. If , then the coordinates of the point where the contour passes between and can be calculated by linear interpolation: , . For the water area, use the adjusted water area elevation data to generate contours using the contour tracing algorithm. For the forest area, based on the fine-tuned forest elevation data , the contour lines are generated using the contour tracking algorithm. For the farmland area, based on the adjusted farmland elevation data , the contour lines are generated using the contour tracking algorithm.
[0018] Furthermore, in the contour integration and optimization step, the contour lines are smoothed by spline interpolation, and the spline interpolation formula , is used to construct a smoothing function, where is the smoothing function obtained after spline interpolation, 、 、 、 are the coefficients of the spline interpolation function, is the independent variable, representing the abscissa position on the contour line, 、 are the abscissa values of the known discrete points, is the ordinate value of the known discrete point, is the number of known discrete points. According to the complexity of the actual terrain and application requirements, the accuracy of the contour lines is adjusted to make the generated contour lines more accurately reflect the actual terrain.
[0019] Compared with the prior art, the method for quickly generating contour lines from a large amount of ASC elevation data has the following beneficial effects:
[0020] First, through the semantic segmentation technology of deep learning, the present invention accurately extracts different terrain elements in the ASC elevation data, providing more accurate basic data for contour line generation. At the same time, different contour line generation strategies and parameters are adopted for different terrain elements, fully considering the characteristics of terrain elements, improving the quality and practicability of the contour lines, and being able to more accurately reflect the actual terrain.
[0021] Second, by establishing a terrain similarity measurement model during the contour line generation process, the present invention quickly generates contour lines using terrain similarity, reducing the amount of calculation; and adopts parallel computing technology to process a large amount of ASC elevation data, distributing the data processing tasks to multiple processing units for simultaneous calculation, greatly improving the contour line generation efficiency and meeting the requirements for quickly processing a large amount of data in practical applications.
[0022] Other advantages, objectives and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0024] Figure 1 It is a flow operation diagram of a method for quickly generating contour lines from a large amount of ASC elevation data;
[0025] Figure 2 It is a flowchart of a method for quickly generating contour lines from a large amount of ASC elevation data. Specific implementation manners
[0026] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following will, in conjunction with the drawings and preferred embodiments, describe in detail the specific implementation manners, structures, features and their effects according to the present invention.
[0027] Embodiment 1
[0028] In the new area planning project of a certain city, it is necessary to accurately process the topographic data of this area to generate contour lines, providing basic support for subsequent building layout, road planning, etc.
[0029] Obtain a large amount of ASC elevation data of this area from the urban geographic information database. Since the original data formats are diverse and there are some error information, use professional data processing software to convert the data format, unify it into a standard format suitable for subsequent processing. By setting reasonable data ranges and data change thresholds, remove the noise points and outliers caused by measurement errors, such as some isolated points that deviate significantly from the surrounding elevation values, and use the normalization algorithm to normalize the data so that all elevation data is within a unified numerical interval for subsequent analysis. During this process, the data processing personnel also backed up the data to prevent data loss or processing errors.
[0030] Collect ASC elevation data samples of this area containing different topographic elements (such as urban green spaces, building lands, water areas, etc.). To ensure the accuracy and consistency of the annotation, organize professional geographic information personnel to use professional annotation tools for detailed annotation. Build a semantic segmentation model using a deep learning framework. During the building process, according to the data characteristics and model performance requirements, select appropriate network structures and parameter settings, use the cross-entropy loss function to measure the difference between the model prediction result and the true label, and adjust the model parameters accordingly. The cross-entropy loss function is: , where, is the loss function value, is the number of samples (i.e., the total number of ASC elevation data samples participating in training, which is obtained by counting the number of training set samples when dividing the sample set), is the sample index (the value range is from 1 to , is the class index (the value range is from 1 to ), is the total number of classes of terrain elements (determined according to the actual number of labeled terrain element classes), denotes that the -th sample belongs to the true label of the -th class of terrain elements (obtained by manually annotating the samples using a professional annotation tool. If it belongs, then , otherwise ), denotes the probability value that the model predicts the -th sample belongs to the -th class of terrain elements (the predicted output of the model for the input sample).
[0031] The sample data is divided into a training set, a validation set, and a test set according to a certain ratio for training. During the training process, by continuously adjusting parameters such as the learning rate and the number of iterations of the model, and using the feedback results of the validation set to optimize the model performance, so that the model can accurately identify various terrain elements. Specifically, according to indicators such as the value of the loss function L on the validation set and the classification accuracy of the model, different parameter combinations are tried multiple times to gradually reduce the loss function L and continuously improve the accuracy of the model. After multiple trainings and adjustments, the model achieves a high recognition accuracy on the test set.
[0032] The preprocessed ASC elevation data is input into the trained semantic segmentation model batch by batch. The model analyzes the features of each data point and outputs the class of terrain elements it belongs to. To ensure the accuracy of the extraction results, the results output by the model are manually checked and corrected. Finally, different terrain elements such as urban green spaces, building land, and water areas are accurately extracted, and the extraction results are stored in a specific data format for subsequent use.
[0033] For the water areas (such as artificial lakes) in the city, collect their water level monitoring data and historical water level change records. Through detailed analysis of these data, it is obtained that the water level change range of this artificial lake is small and is mainly affected by seasonal precipitation and urban water regulation. Use the formula to adjust the elevation value of the water area, where is the adjusted elevation value of the water area, is the original elevation value of the water area (derived from the elevation value of the water area in the original ASC elevation data), is the water level change value (obtained by analyzing and calculating the collected water level data, such as calculating the water level difference at different time points or statistically calculating the average water level change value over a period of time), is the adjustment coefficient (usually within the range of ([0,1])), which is set based on the preliminary understanding of the water area topography and the empirical knowledge in related fields. For example, for an artificial water area with relatively stable topography and less affected by water level changes, it can be initially set to 0.2. For a natural water area that is more sensitive to water level changes, it can be initially set to around 0.8. It can also refer to the parameter values used in the research or projects of similar water areas and be adjusted by comparing the actual terrain data and the generated contour lines. Collect the on-site measurement data of this water area and compare it with the contour lines generated using the current value. If it is found that there is a large deviation between the generated contour lines and the actual terrain in the water level change area, increase or decrease the value accordingly. It is also possible to use different values to conduct multiple simulation experiments and evaluate the generated results from multiple perspectives (such as the degree of fit between the contour lines and the water area boundary, the accuracy of the contour lines in reflecting the water level change trend, etc.). Select the value that makes the generated result most conform to the actual situation. After adjustment, determine the final value to accurately reflect the water area terrain change. For urban green spaces (such as parks), comprehensively use high-resolution remote sensing image data and the measured vegetation height data on the ground. Not only consider the average height of the vegetation, but also analyze the influence of the vegetation distribution density and species on the terrain. Use the formula to fine-tune the elevation value of the forest area, where is the adjusted elevation value of the forest area, is the original elevation value of the forest area (derived from the elevation value of the forest area in the original ASC elevation data), is the vegetation height value (the average vegetation height or the vegetation height at a specific location obtained by analyzing and extracting remote sensing images and statistically measuring on the ground), is the fine-tuning coefficient (usually within the range of \([0,1]\)), which is initially set according to the density and height difference of the forest vegetation. For a forest with dense and tall vegetation, it can be initially set to around 0.8. For a forest with relatively sparse and low vegetation, it can be initially set to around 0.2. It can also be determined in combination with the relevant results of vegetation ecological research to determine the initial value. Compare the remote sensing image of the forest area and the generated contour lines. Compare the generated contour lines with the remote sensing image. If it is found that the contour lines do not accurately reflect the terrain change in the vegetation-covered area, adjust the value. If the change of the contour lines is not obvious, increase the value. If the change of the contour lines is excessive, decrease the value. If the change of the contour lines is too large, decrease the Values can also be obtained through on-site inspections and measurements. Compare the on-site measurement data with the contour lines, and adjust the values according to the differences to finally determine the appropriate values, so that the generated contour lines can more accurately reflect the terrain of the green space. For construction land, according to the requirements for land leveling in urban planning and factors such as the foundation depth of buildings, combined with the type and functional requirements of the buildings, set appropriate contour line generation parameters.
[0034] Divide the newly obtained terrain data and the processed terrain data of other areas in the city into small areas of the same size. To more comprehensively analyze the terrain characteristics, calculate the area ratio, average elevation value, and elevation fluctuation degree of different terrain elements in each small area and other characteristic values. Use the formula to calculate the similarity degree between the small areas of the processed data and the small areas of the new data, where is the similarity measurement value The smaller the value, the more similar the two regions are), is the number of characteristic values (determined according to the number of characteristics selected to measure terrain similarity, such as the total number of characteristics such as terrain element ratio, average elevation, and elevation standard deviation), is the characteristic index (the value range is from 1 to ), represents the th characteristic value of the small area of the processed data, represents the th characteristic value of the small area of the new data. Through the terrain similarity measurement model, find the part with high similarity to the processed terrain area in the new terrain data (for example, the similarity reaches a certain threshold). For this part of the area, draw on the parameters and results of the contour line generation in the similar area, and make appropriate adjustments according to the differences between the new area and the similar area to quickly generate the contour lines of the similar part in the new area.
[0035] For the part in the new terrain data that has no similar area to draw on (the similarity is lower than the threshold), according to the characteristics of different terrain elements, use the corresponding contour line generation method: For general terrain areas, assume that the data points are stored in a two-dimensional matrix , where represents the elevation value of the data point in the th row and th column, the contour interval is , the current contour elevation is , for the adjacent four data points , , , , determine the position of the quadrilateral formed by the contour line passing through these four points according to the bilinear interpolation method. Assume is The planar coordinates of a point , if , then the coordinates of the points where the contour line passes between and can be calculated by linear interpolation: , , , and the intersection points of other sides can be calculated in the same way. Connect these intersection points to form a section of the contour line.
[0036] For the water area, the adjusted water elevation data is used to generate contour lines using the above contour line tracing algorithm. For urban green spaces, based on the fine-tuned green space elevation data , the contour line tracing algorithm is used to generate contour lines. During the generation process, the multi-core processor of the computer is used for parallel computing. During the calculation process, the computing tasks are reasonably allocated to optimize the use of computing resources and improve the efficiency of generating contour lines. At the same time, the generated contour lines are monitored and quality checked in real time to ensure the accuracy and integrity of the contour lines.
[0037] Merge the contour lines generated for different terrain elements. During the merging process, a special algorithm is used to remove duplicate and unreasonable parts, such as some overlapping or discontinuous contour line segments. Smooth the integrated contour lines using the spline interpolation formula , to construct a smoothing function, where is the smoothing function obtained after spline interpolation, , , , are the coefficients of the spline interpolation function (obtained by solving a system of linear equations using mathematical methods through the known discrete point coordinates and certain boundary conditions and continuity conditions), is the independent variable (representing the abscissa position on the contour line), , are the abscissa values of the known discrete points (used to determine the interpolation interval), is the ordinate value of the known discrete point (i.e., the elevation value on the original contour line), Let \(N\) be the number of known discrete points (obtained by counting the number of original discrete coordinate points of the generated contour lines). According to the requirements of urban planning for the accuracy of terrain data, adjust the accuracy of the contour lines. For example, in key planning areas, increase the number and density of contour lines to provide more detailed terrain information. In general areas, appropriately reduce the number of contour lines to improve the simplicity of the data. The finally generated contour lines provide accurate terrain information for urban planners, making the building layout more reasonable, the road planning better adapt to the terrain undulations, reducing unnecessary earthwork and construction costs. At the same time, accurate contour line data also helps urban planners in tasks such as urban drainage system design and landscape planning, enhancing the scientific and reasonable nature of urban planning.
[0038] Example Two
[0039] In a water conservancy project construction project in a certain river basin, accurate contour lines are required to evaluate the flood control ability of the river, plan the location of dikes, etc.
[0040] Obtain a large amount of ASC elevation data for the river basin through various channels, including satellite remote sensing mapping, UAV terrain scanning, and ground measurement equipment. Since these data sources are diverse and there are differences in format and accuracy, use professional data processing software to convert the data format into a standard format convenient for analysis, and remove noise points and outliers generated by measurement errors, signal interference, etc. in the data. For example, some isolated elevation points that deviate significantly from the surrounding terrain. At the same time, in order to make the data have better compatibility and comparability in subsequent processing, use the normalization method to normalize the data, mapping all elevation data into a specific numerical interval. During the data processing process, strictly control the quality of the data, conduct multiple inspections and verifications to ensure the accuracy and integrity of the data, and back up and store the processed data.
[0041] Collect ASC elevation data samples containing terrain elements such as rivers, riverbank vegetation, and farmland. Organize professional staff in the fields of geographic information and water conservancy, and use high-precision annotation tools for detailed annotation. To improve the accuracy and consistency of annotation, develop detailed annotation specifications and standards. Build a semantic segmentation model using a deep learning framework. According to the characteristics of the data and the performance requirements of the model, carefully select the network structure and parameter configuration. Divide the sample data into training set, validation set, and test set according to a scientific ratio for training. During the training process, use the loss function to continuously adjust the parameters of the model, and at the same time use the feedback results of the validation set to optimize and adjust the model in real time to improve the generalization ability and recognition accuracy of the model. After multiple rounds of training and testing, the model achieves an ideal recognition effect on the test set and can accurately distinguish different terrain elements.
[0042] The preprocessed data are input into the trained semantic segmentation model in batches and in an orderly manner. The model deeply analyzes and judges the features of each data point and outputs the category of terrain elements to which it belongs. In order to further improve the reliability of the extraction results, the results output by the model are manually reviewed and corrected, especially for some areas with blurred boundaries or difficult to accurately judge. Finally, different terrain elements such as rivers, riverside vegetation, and farmland are accurately extracted, and the extraction results are stored and managed in a structured data format to facilitate subsequent contour line generation and analysis.
[0043] For river areas, long-term water level monitoring data of the river is collected, including water level changes in different seasons and years, and historical flood records, such as the time of flood occurrence, water level peak, inundation range, etc. Through in-depth analysis and mining of these data, the law and trend of river water level changes are determined, and the amplitude and frequency of water level changes, as well as the probability of flood occurrence and impact range are analyzed. Based on this situation, the adjustment strategy for the elevation data of the river area is determined. When generating contour lines, full consideration is given to the terrain changes of the river under different working conditions such as normal water level and flood level, so that the generated contour lines can accurately reflect the terrain characteristics of the river under different water level conditions, providing accurate terrain information support for flood control planning, flood warning and the design of water conservancy facilities.
[0044] For riverbank vegetation areas, we comprehensively utilize high-resolution satellite remote sensing image data and vegetation height data measured on the spot. We not only obtain the average height of vegetation, but also analyze in detail the impact of factors such as vegetation type, distribution density, and the reinforcement effect of roots on the soil on the terrain. Taking the impact of vegetation on the terrain into consideration, we fine-tune the elevation data of riverbank vegetation areas. For example, in areas with dense vegetation and developed root systems, we appropriately increase the terrain elevation to more accurately reflect the protection and change of vegetation on the riverbank terrain, so that the generated contour lines are more in line with the actual terrain. This is of great significance for evaluating the stability of the riverbank and planning riverbank protection projects.
[0045] For farmland areas around rivers, land use planning data of farmland are collected, including the planting type, irrigation method, drainage system layout, etc. of farmland, as well as irrigation facility layout data, such as the direction of irrigation channels, the location of pumping stations, etc. The flatness of the farmland and the impact of irrigation on the terrain are considered. Appropriate contour generation parameters are set in combination with the terrain characteristics of the farmland and the layout of water conservancy facilities. For example, near the irrigation channel, the direction and spacing of the contour lines are specially set according to the slope of the channel and the water level changes, so as to more accurately reflect the changes in the farmland terrain during the irrigation process, and provide a reliable basis for the optimal design of farmland water conservancy facilities and the rational allocation of water resources.
[0046] Divide the new terrain data and the terrain data of other processed areas in the basin into small areas of appropriate size. To comprehensively and accurately describe the terrain features, calculate characteristic values such as the area proportion of different terrain elements, the average elevation value, and the standard deviation of elevation within each small area to reflect the undulation and uniformity of the terrain. By using similarity measurement methods, calculate the similarity degree between regions, evaluate the similarity between regions from multiple perspectives, find the processed areas with high similarity to the new area, and draw on the parameters and results of contour generation in these areas to quickly generate the contours of the similar parts in the new area. For the parts without similar areas to draw on, process them separately according to the contour generation strategies for different terrain elements. Utilize GPU parallel computing technology to reasonably distribute the data processing tasks to multiple GPU cores for parallel processing, giving full play to the computing power of the GPU and accelerating the contour generation speed. During the generation process, monitor the computing process and results in real time, and adjust and handle any abnormal situations promptly to ensure the quality and efficiency of contour generation.
[0047] Merge the contours generated for different terrain elements. During the merging process, use intelligent algorithms to automatically identify and remove duplicate and unreasonable parts, such as overlapping contours and contour segments that do not conform to the terrain change law. Smooth the integrated contours using a high-precision spline interpolation algorithm to make the contours smoother and more natural, conforming to the actual terrain change trend. According to the requirements of water conservancy projects for the accuracy of terrain data, adjust the contour accuracy. In key areas, such as near dams and flood-prone areas, increase the number and density of contours to provide more detailed and accurate terrain information. In general areas, appropriately reduce the number of contours to improve the simplicity and processing efficiency of the data. The finally generated contours provide accurate terrain information for water conservancy engineers to evaluate the flood prevention ability of rivers, plan the positions of dams, and design irrigation systems, etc., helping to ensure the safety and effectiveness of water conservancy projects. At the same time, accurate contour data can also provide important decision-making basis for the rational development and utilization of water resources, ecological environment protection, etc., promoting the sustainable development of river basins.
[0048] The above is only a preferred embodiment of the present invention and does not impose any form of limitation on the present invention. Although the present invention has been disclosed as above with a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the above-disclosed technical content to form equivalent embodiments with equivalent changes within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any brief modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A fast contour generation method for massive ASC elevation data, characterized in that, The method includes the following specific steps: Data preprocessing: After obtaining a large amount of ASC elevation data, perform format conversion, remove noise and outliers, and adjust the data to a suitable range through normalization; Semantic segmentation model training: Collect ASC elevation data samples containing different terrain elements and label them. Build a model through a deep learning framework, divide the sample set for training, build a model through a deep learning framework, use the cross-entropy loss function to measure the difference between the model prediction result and the true label, and adjust the model parameters accordingly; Terrain element extraction: Input the preprocessed large amount of ASC elevation data into the trained semantic segmentation model, and organize the output results to accurately extract different terrain elements; Determination of contour generation strategy: For different terrain elements, determine the corresponding contour generation strategies and parameters respectively. For the water area, combine the water level data to determine the elevation adjustment strategy and parameters for generating contours. For the forest area, comprehensively utilize the high-resolution remote sensing image data and the measured vegetation height data on the ground, analyze the distribution and height of the vegetation, and determine the corresponding fine-tuning strategy and parameters by considering the vegetation height factor when generating contours. For the farmland area, collect the land use planning data and irrigation facility layout data of the farmland, and set appropriate contour elevation values in combination with the flatness of the farmland to accurately represent the farmland terrain; Contour generation: Divide the new terrain data and the processed data into small areas and calculate the feature values. Find the similar parts by calculating the similarity between regions and generate contours by referring to them. Process the parts without similar parts according to the terrain element generation strategy respectively; Contour integration and optimization: Merge the contours generated by different terrain elements, remove the duplicate and unreasonable parts, smooth the contours through spline interpolation, and adjust the accuracy according to the actual needs to conform to the actual terrain situation.
2. A method for quickly generating contour lines from a large amount of ASC elevation data according to claim 1, characterized in that, In the training steps of the semantic segmentation model, a model is built through a deep learning framework, and the cross-entropy loss function is used to measure the difference between the model prediction result and the true label, and the model parameters are adjusted accordingly. The cross-entropy loss function is as follows: , where is the loss function value, which is used to measure the difference between the model prediction result and the true label. The smaller the value, the more accurate the model prediction. is the number of samples, that is, the total number of ASC elevation data samples participating in the training. is the sample index, and its value range is from 1 to , which is used to traverse each sample. is the class index, and its value range is from 1 to , which is used to traverse each terrain feature class. is the total number of terrain feature classes. represents the true label that the -th sample belongs to the -th terrain feature class. If it belongs, then , otherwise . represents the probability value that the model predicts the -th sample belongs to the -th terrain feature class, and its value range is between [0, 1].
3. A method for quickly generating contour lines from a large amount of ASC elevation data according to claim 1, characterized in that, In the step of determining the contour generation strategy, for different terrain elements, determine the corresponding contour generation strategies and parameters respectively. For the water area, collect the real-time water level data and historical water level change data recorded by the water level monitoring equipment, analyze the amplitude and frequency characteristics of the water level change, and determine the adjustment method of the water area elevation data when generating contours according to these characteristics. For the forest area, comprehensively utilize the high-resolution remote sensing image data and the measured vegetation height data on the ground, analyze the distribution and height of the vegetation, and determine the corresponding fine-tuning strategy and parameters by considering the vegetation height factor when generating contours. For the farmland area, collect the land use planning data and irrigation facility layout data of the farmland, and set appropriate contour elevation values in combination with the flatness of the farmland to accurately represent the farmland terrain.
4. A method for quickly generating contour lines from a large amount of ASC elevation data according to claim 1, characterized in that, In the step of determining the contour generation strategy, for the water area, based on these features, the adjustment method of the elevation data of the water area when generating contours is determined, and its adjustment formula is: , where is the adjusted elevation value of the water area, is the original elevation value of the water area, is the water level change value, is the adjustment coefficient. For the forest area, when generating contours, the vegetation height factor is taken into account to determine the corresponding fine-tuning strategy and parameters, and its adjustment formula is: , where is the adjusted elevation value of the forest area, is the original elevation value of the forest area, is the vegetation height value, is the fine-tuning coefficient. For the farmland area, collect the land use planning data and irrigation facility layout data of the farmland, and combine with the leveling degree of the farmland to set the appropriate contour elevation value, and its calculation formula is: , where is the adjusted elevation value of the farmland area, is the original elevation value of the farmland area, is the elevation change value caused by irrigation, is the irrigation influence coefficient, is the slope correction value according to the farmland slope and land leveling plan.
5. A method for quickly generating contour lines of a large amount of ASC elevation data according to claim 1, characterized in that, In the contour generation step, when processing new terrain data, the processed ASC elevation data and the new terrain data are divided into several small regions of the same size. For each small region, characteristic values such as the area ratio of different terrain elements, the average elevation value, and the degree of elevation fluctuation are calculated respectively. According to these characteristic values, the similarity degree between the small region of the processed data and the small region of the new data is calculated, and a terrain similarity measurement model is established. Through the terrain similarity measurement model, the part of the new terrain data with a relatively high similarity degree to the processed terrain region is found, and the parameters and results adopted by the generated contours in the similar region are directly borrowed, and adjustments are made according to the slight differences in the distribution of terrain elements, elevation, etc. between the new region and the similar region, so as to quickly generate the contours of the similar part in the new region. For the part of the new terrain data that has no similar region to borrow, according to the determined contour generation strategies and parameters for different terrain elements, contour generation operations are respectively carried out on the extracted different terrain elements. By processing the elevation data of each terrain element in logical order, the corresponding contours are generated.
6. A method for quickly generating contour lines from a large amount of ASC elevation data according to claim 1, characterized in that, In the contour generation step, a terrain similarity measurement model is established. Through the terrain similarity measurement model, the part with a relatively high similarity degree to the processed terrain area in the new terrain data is found. Its model formula is: , where represents the similarity measurement value between two small regions, the smaller the value, the more similar the two regions are, is the number of eigenvalue, is the eigenvalue index, and its value range is from 1 to , which is used to traverse each eigenvalue, represents the th eigenvalue of the processed data small region, represents the th eigenvalue of the new data small region, corresponding to the same type of eigenvalue as , and are obtained by performing eigenvalue calculations on the processed ASC elevation data small region and the new ASC elevation data small region respectively.
7. A method for quickly generating contour lines of a large amount of ASC elevation data according to claim 1, characterized in that, In the step of generating contour lines, for the part of the new terrain data that has no similar area to refer to, the contour line generation operation is performed on the extracted different terrain elements according to the determined contour line generation strategy and parameters for different terrain elements. Specifically, for the general terrain area, the data points are arranged in a two-dimensional matrix. Storage, where Indicates Line The elevation values of the data points in the column are , the current contour elevation is , for four adjacent data points , , , , determine the position of the quadrilateral formed by the contour lines passing through these four points using the bilinear interpolation method. Let for The plane coordinates of the point (x_{i}, y_{j}), if , then the contour lines are and Points passing through The coordinates of can be calculated by linear interpolation: , For water areas, the adjusted water elevation data , using the contour tracing algorithm to generate contour lines, for forest areas, based on fine-tuned forest elevation data , using the contour tracing algorithm to generate contour lines, for farmland areas, based on the adjusted farmland elevation data , contour lines are generated using a contour tracing algorithm.
8. A fast contour generation method for a large amount of ASC elevation data according to claim 1, characterized in that, In the contour integration and optimization step, the contour is smoothed by spline interpolation, and the spline interpolation formula , is used to construct a smoothing function, where is the smoothing function obtained after spline interpolation, , , , are the coefficients of the spline interpolation function, is the independent variable, representing the abscissa position on the contour, , are the abscissa values of the known discrete points, is the ordinate value of the known discrete point, is the number of known discrete points. According to the complexity of the actual terrain and application requirements, the accuracy of the contour is adjusted to make the generated contour more accurately reflect the actual terrain situation.