DEM-based depression multi-dimensional information and vector boundary extraction method

Through the DEM-based multi-dimensional information and vector boundary extraction method, the problem of low depression extraction efficiency in complex scenarios is solved, efficient multi-dimensional information extraction and vector boundary processing are realized, and data processing efficiency and analysis capabilities are significantly improved.

CN119579631AInactive Publication Date: 2025-03-07XIAMEN GREAT POWER GEO INFORMATION TECH +1

Patent Information

Application Number
CN202411553357.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-03-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to perform refined extraction and submersion risk assessment of multi-dimensional information and vector boundaries in complex scenarios, especially in large-scale DEM data processing, which has problems such as low data processing efficiency and insufficient feature extraction.

Method used

The multi-dimensional information and vector boundary extraction method based on DEM are used to convert SRTM DEM data through secondary convolution sampling method, and the depth distribution map of the depression is generated by combining the depression filling method. The multi-dimensional attribute information and vector surface data of the depression are extracted through morphological processing and multi-threaded parallel calculation.

Benefits of technology

The data processing efficiency of multi-dimensional information extraction in depressions has been improved, the performance of depressions has been significantly improved, the fault tolerance of the method has been enhanced, and the multi-dimensional analysis needs in complex scenarios of the power grid are efficiently responded to the needs of multi-dimensional analysis in complex scenarios of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579631A_ABST
    Figure CN119579631A_ABST
Patent Text Reader

Abstract

The invention relates to a depression multi-dimensional information and vector boundary extraction method based on a DEM, and the method specifically comprises the steps: converting DEM data into plane projection through employing a quadratic convolution sampling method, determining the position of a depression through a depression filling method, and generating a depression depth distribution diagram. And processing the depth distribution map by using a preset rule, obtaining a depression distribution binary image, performing morphological processing, filling small holes, and retaining a main shape. And precisely extracting the contour of each depression, and generating a vector surface data file. And multiplying the depression depth distribution map by the corresponding pixel value of the binary image, and removing depression depth values which do not participate in calculation. Calculating the volume of each depression in combination with the vector surface data, performing grading, calculating the water storage volumes of different depth levels, and performing layer-by-layer accumulation to obtain range images corresponding to the water storage volumes of different levels. And finally, integrating the multi-dimensional attribute information of each depression into a corresponding vector plane, and carrying out simplification processing on the boundary to improve the data processing efficiency and availability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of DEM data processing, in particular to a method for extracting multi-dimensional information and vector boundaries of depressions based on DEM. Background Art

[0002] Low-lying areas refer to areas with lower elevations than the surrounding areas and no drainage points, which will cause water accumulation after precipitation. Depression extraction is crucial in the power industry. It not only helps with grid planning and design, avoids potential water damage and ensures the safety of power facilities, but also plays a key role in infrastructure construction, disaster management and environmental protection. Accurately identifying the location of depressions can optimize construction plans, reduce risks and costs, and improve the resilience of power facilities in natural disasters. At the same time, it is not enough to only know the location information of depressions. Extracting multi-dimensional information of depressions, such as area, depth, volume and range corresponding to different volumes, supports scientific decision-making based on data, which can significantly improve the ability of decision makers to obtain high-precision geographic information, enhance the safety and reliability of power infrastructure, and effectively respond to potential natural disasters and environmental changes. Therefore, the extraction of multi-dimensional depression information is of great significance for risk management and planning in the power industry.

[0003] Although the spatial analysis tools in the commercial software ArcGIS can extract the corresponding depression area according to the depth specified by the user, the function of this tool is relatively simple and can only perform basic depression extraction, lacking the ability to conduct in-depth analysis of complex scenes. Supermap in China has developed a tool that can achieve dynamic simulation of three-dimensional flooding through basic parameter settings, mainly used to provide intuitive visual effects. These existing tools have limitations and cannot perform customized multi-dimensional information analysis of flooded areas, making it difficult to meet the needs of refined flooding risk assessment in complex scenarios. In addition, large-scale DEM data is huge in volume, and whether it is reading and loading, or processing and analysis, it is necessary to develop efficient algorithms and optimization technologies to ensure the real-time and accuracy of data processing, while the existing related extraction algorithms are more suitable for small-scale data processing.

[0004] In the prior art CN115839707A, a method for accurately identifying farmland depression features based on digital terrain models is disclosed. A centimeter-level high-precision farmland digital terrain model is established based on drone aerial images, and an inverted digital terrain model is established based on the average elevation of the DTM); in the RDTM environment, the farmland elevation maximum points are extracted; three terrain factors, namely elevation, terrain undulation and slope, are selected, the weights of the above terrain factors are determined by the entropy weight method, the comprehensive membership of the terrain factors is obtained by the weighted method, and the threshold is determined by the comprehensive membership of the multi-window terrain factors to locate the position of the farmland depression features; the contour analysis method is used to identify the outer contours of the farmland depression features, and the filling volume of each depression feature is calculated.

[0005] The existing techniques for extracting farmland depression features are all aimed at processing farmland data within a small range, and the selected feature extraction methods are also methods for extracting features of small-scale data. When faced with the extraction and processing of data in a larger range, there are challenges. In the face of more complex target scenarios, the extracted features are not detailed and accurate enough, and the depression data and flooding risk assessment are not accurate enough. Summary of the invention

[0006] In order to solve the above problems in the prior art, the present invention proposes a method for extracting multi-dimensional information and vector boundaries of depressions based on DEM.

[0007] The technical solution of the present invention is as follows:

[0008] On the one hand, the present invention proposes a method for extracting multi-dimensional information and vector boundaries of depressions based on DEM, and the specific steps include:

[0009] The SRTM DEM data was converted into Mercator plane projection using the secondary convolution sampling method, and then the depression location was calculated and determined using the depression filling method, and the depression depth distribution map was generated.

[0010] The depression depth distribution map is processed using preset rules to obtain a binary image of the depression distribution, and the binary image of the depression distribution is morphologically processed to fill small holes in the depression area, while removing the fragmented depression surface and retaining its main shape;

[0011] Accurately extract the contours of each depression from the binary image of depression distribution, and generate vector surface data files of each depression;

[0012] The corresponding pixel values ​​of the depression depth distribution map and the binary image of the depression distribution are multiplied to remove the depression depth values ​​at the positions that are not involved in the calculation; the volume of each depression is calculated respectively in combination with the vector surface data of each depression position, and the volume of the depression is classified;

[0013] Calculate the water storage volume of different depth levels in each depression, and accumulate them level by level to generate a binary image of the corresponding range of water storage volume of each depression;

[0014] The calculated multi-dimensional attribute information of each depression is integrated into the vector surface data file of each depression, wherein the multi-dimensional attribute information of the depression includes the depth, contour, area, total volume and the corresponding range of water storage volume at different depth levels of the depression; and the boundary of the vector surface is simplified.

[0015] As a preferred implementation, the steps of calculating and determining the depression position and generating the depression depth distribution map are specifically as follows:

[0016] By calculating the height relationship between each pixel and all pixels in its neighborhood, the depressions that are lower than the surrounding pixels are identified;

[0017] Find the pour point closest to each sink point, that is, the boundary pixel with the lowest elevation in the confluence area;

[0018] The height value of each depression pixel is raised to the height of the nearest pouring point until all depressions are filled. The height data obtained by filling the depressions is subtracted from the original DEM data to obtain the height data of the depressions and generate a depression depth distribution map.

[0019] As a preferred implementation, the step of processing the depression depth distribution map using preset rules to obtain a binary image of the depression distribution is specifically as follows:

[0020] The height data of the depression is the depth of the depression. The pixels with a depth less than or equal to 1 meter are eliminated, and the pixels with a depth greater than 1 meter are set to 1, and the pixels with a depth less than or equal to 1 meter are set to 0, to obtain a binary image of the depression distribution.

[0021] As a preferred implementation, the steps of performing morphological processing on the binary image of the depression distribution, filling the small holes in the depression area, and removing the fragmented depression surface while retaining its main shape are specifically as follows:

[0022] Invert the input binary image, changing pixel value 0 to 1 and 1 to 0;

[0023] Apply a dilation operation to the inverted image to construct a 3×3 structure element with each pixel value of 1. Move the structure element to align the center of the structure element with each foreground pixel. If any part of the structure element covers a foreground pixel, set the pixel and its neighborhood to 1;

[0024] Perform an erosion operation on the expanded image, also using a 3×3 structure element; for each foreground pixel, check whether the structure element completely falls in the foreground area. If so, keep the pixel as a foreground pixel, otherwise set it to the background;

[0025] The processed image is inverted again to convert the background area into holes, thereby generating a filled binary image;

[0026] Finally, an opening operation is performed, that is, the filled image is first expanded and then eroded.

[0027] As a preferred implementation, the steps of accurately extracting the contours of each depression from the binary image of the depression distribution and generating a vector surface data file of each depression are specifically as follows:

[0028] Gridding the image, dividing the binary image of depression distribution into uniform grids to ensure the integrity of each pixel;

[0029] Contour line generation: for each grid, check the values ​​of the pixels at both ends of its four sides; if the pixel values ​​on both sides of an edge are different, record the index of the edge and the coordinates of the two endpoints; when processing adjacent grids, use the state information of the shared boundary to reduce repeated calculations; for the outer edge of the grid located at the edge of the image, if one side of the pixel value is 1, record the relevant information to prevent the loss of contour information; finally, connect the adjacent points in all grids according to the recorded edge index to form a complete contour line;

[0030] Process the inner and outer contours and calculate the area and center of gravity of each contour. When the area of ​​contour A is smaller than that of contour B and the center of gravity of contour A is within the area enclosed by contour B, contour B is judged to be the outer contour and contour A is its corresponding inner contour. The coordinates of the outer contour are stored in a clockwise direction and the coordinates of the inner contour are stored in a counterclockwise direction, and the result is finally output as a vector surface data file.

[0031] As a preferred implementation, the step of calculating the volume of each depression according to the vector surface data of each depression position is specifically as follows:

[0032] The multi-threaded parallel calculation of the vector surface is realized by the partial reading method. When processing each vector surface, the depth data of the depression in the corresponding range is firstly extracted according to its bounding box, and the bounding box is the minimum rectangular box containing the vector surface; then a mask of the same range is created, and each pixel is traversed to determine its spatial relationship with the vector surface, and only the pixels located in the vector surface are retained; finally, the valid pixels in the range are calculated to obtain the volume of the corresponding depression. The specific calculation formula is as follows:

[0033]

[0034] Where V a represents the volume corresponding to the Ath vector surface; i represents the i-th pixel; n represents the number of pixels in the Ath vector surface; h i represents the depth value corresponding to the i-th pixel; S represents the area of ​​each pixel.

[0035] As a preferred implementation, the steps of calculating the water storage volume of different depth levels in each depression, and accumulating them level by level to generate a binary image of the corresponding range of the water storage volume level by level corresponding to each depression are specifically as follows:

[0036] Traverse each depression vector surface data file, first obtain the depression depth value of the corresponding range of its bounding box, then create a mask of the same range, sort it from large to small by depth value, and the pixel with the larger value will be submerged first, and the number of unique values ​​is recorded as l;

[0037] Get the adjacent values ​​of the depression depth value and Calculate the volume of each layer And the calculation is carried out in the order of the depth of the depression from small to large. The specific calculation formula is as follows:

[0038]

[0039] In the formula, is the volume of each depth level, is the number of pixels corresponding to each depth value, and is the depth value of each depth level and its adjacent levels;

[0040] The volume of each depth level is accumulated to obtain And judge The depression volume is classified and the pixel location and level information is stored in the database; at the same time, the information of the processed data is recorded by establishing a transaction log to ensure that the data can be smoothly restored after the processing is interrupted;

[0041] Finally, several zero-value images with the same range and pixel size as the original image are created, and the corresponding level pixel positions stored in the database are assigned a value of 1, thereby generating binary images of the corresponding range of the step-by-step water storage volume.

[0042] As a preferred implementation, the steps of integrating the calculated multi-dimensional attribute information of each depression into the vector surface data file of each depression and simplifying the boundary of the vector surface are specifically as follows:

[0043] Based on each vector surface data file, calculate the area of ​​each triangle formed by three consecutive points. i , calculate the triangle (P i-1 ,P i ,P i+1 ) and associate each point with its corresponding area. The specific calculation formula is as follows;

[0044]

[0045] Sort by area from small to large, find the point with the smallest area and remove it, then update the area of ​​the adjacent triangles. Continue this process until the minimum area is greater than the set threshold S T ;

[0046] Finally, the vector surface is updated to the simplified point set.

[0047] On the other hand, the present invention proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for extracting multi-dimensional information and vector boundaries of a depression based on DEM as described in any embodiment of the present invention is implemented.

[0048] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for extracting multi-dimensional information and vector boundaries of a depression based on a DEM as described in any embodiment of the present invention.

[0049] The present invention has the following beneficial effects:

[0050] 1. The present invention improves data processing efficiency by applying a multi-threaded parallel processing strategy to multiple steps of depression multi-dimensional information extraction, especially significantly improving the processing efficiency of large-scale data;

[0051] 2. The present invention introduces morphological processing methods to effectively suppress the influence of data noise and significantly improve the performance of depression morphology;

[0052] 3. The present invention combines a log recovery mechanism, and when an error or system failure occurs, the error node can be traced back through the log and processing can be continued, thereby significantly enhancing the fault tolerance of the method;

[0053] 4. The present invention generates a vector surface file that collects various depression data through the constructed depression multi-dimensional information extraction method, which can efficiently respond to the multi-dimensional analysis needs in complex power grid scenarios. With its customized processing capabilities and applicability to large-scale data, the application potential of this method is greatly expanded. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.

[0057] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0058] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0059] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0060] Embodiment 1:

[0061] See also Figure 1 , a method for extracting multi-dimensional information and vector boundaries of depressions based on DEM, the specific steps include:

[0062] The SRTM DEM data was converted into Mercator plane projection using the secondary convolution sampling method, and then the depression location was calculated and determined using the depression filling method, and the depression depth distribution map was generated.

[0063] The depression depth distribution map is processed using preset rules to obtain a binary image of the depression distribution, and the binary image of the depression distribution is morphologically processed to fill small holes in the depression area, while removing the fragmented depression surface and retaining its main shape;

[0064] Accurately extract the contours of each depression from the binary image of depression distribution, and generate vector surface data files of each depression;

[0065] The corresponding pixel values ​​of the depression depth distribution map and the binary image of the depression distribution are multiplied to remove the depression depth values ​​at the positions that are not involved in the calculation; the volume of each depression is calculated respectively in combination with the vector surface data of each depression position, and the volume of the depression is classified;

[0066] In this embodiment, the calculated depression volume is classified according to the actual application requirements. According to the distribution of national data, the depression volume is divided into the following four levels: less than 20000m 3 20000-50000m 3 50000-100000m 3 , greater than 100000m 3 .

[0067] Calculate the water storage volume of different depth levels in each depression, and accumulate them level by level to generate a binary image of the corresponding range of water storage volume of each depression;

[0068] In this embodiment, in order to efficiently calculate the corresponding range of each depression in the aforementioned four water storage volume levels, a multi-threaded parallel computing strategy is adopted. When traversing each depression vector surface, first obtain the depression depth value of the corresponding range of its bounding box; for vector surfaces with smaller areas, the time to traverse each pixel therein is relatively short, while for vector surfaces with very large areas, the traversal operation takes a long time. In view of the fact that the accuracy requirement for calculating the volume level is lower than that for calculating the volume, and the depression depth value of the position not involved in the calculation has been assigned to 0, the interference when calculating the volume level is relatively small. In addition, under normal circumstances, the volume level corresponding to the complete range of this type of depression is mostly the fourth level, and the range extraction of the first few levels is generally not affected by the fourth level. Therefore, for vector surfaces with very large areas (the threshold is set to be greater than 10,000,000 square meters in this scheme), a quick judgment method is adopted: ① The image corresponding to the range of the vector surface boundary box is divided into four parts according to half of the horizontal and vertical axis spans; ② Determine whether the four vertices of each part are all within the range of the vector surface: if so, it is considered that all pixels of the part are within the vector surface, otherwise the part is further subdivided into four parts for recursive judgment; ③ When the length or width of a part is less than 6 pixels, the branch stops recursion.

[0069] The calculated multi-dimensional attribute information of each depression is integrated into the vector surface data file of each depression, wherein the multi-dimensional attribute information of the depression includes the depth, contour, area, total volume and the corresponding range of water storage volume at different depth levels of the depression; and the boundary of the vector surface is simplified.

[0070] As a preferred implementation of this embodiment, the steps of calculating and determining the depression position and generating the depression depth distribution map are specifically as follows:

[0071] By calculating the height relationship between each pixel and all pixels in its neighborhood, the depressions that are lower than the surrounding pixels are identified;

[0072] Find the pour point closest to each sink point, that is, the boundary pixel with the lowest elevation in the confluence area;

[0073] The height value of each depression pixel is raised to the height of the nearest pour point until all depressions are filled, the height data of the depressions is obtained, and a depression depth distribution map is generated.

[0074] In this embodiment, the inclined point is the water overflow point of the depression.

[0075] As a preferred implementation of this embodiment, the step of processing the depression depth distribution map using preset rules to obtain a binary image of the depression distribution is specifically as follows:

[0076] The height data of the depression is the depth of the depression. The pixels with a depth less than or equal to 1 meter are eliminated, and the pixels with a depth greater than 1 meter are set to 1, and the pixels with a depth less than or equal to 1 meter are set to 0, to obtain a binary image of the depression distribution.

[0077] As a preferred implementation of this embodiment, the steps of performing morphological processing on the binary image to fill the small holes in the depression area and remove the fragmented depression surface while retaining its main shape are specifically as follows:

[0078] Invert the input binary image, changing pixel value 0 to 1 and 1 to 0;

[0079] Apply a dilation operation to the inverted image to construct a 3×3 structure element with each pixel value of 1. Move the structure element to align the center of the structure element with each foreground pixel. If any part of the structure element covers a foreground pixel, set the pixel and its neighborhood to 1;

[0080] Perform an erosion operation on the expanded image, also using a 3×3 structure element; for each foreground pixel, check whether the structure element completely falls in the foreground area. If so, keep the pixel as a foreground pixel, otherwise set it to the background;

[0081] The processed image is inverted again to convert the background area into holes, thereby generating a filled binary image;

[0082] Finally, an opening operation is performed, that is, the filled image is first expanded and then eroded.

[0083] As a preferred implementation of this embodiment, the steps of accurately extracting the contours of each depression from the binary image of the depression distribution and generating a vector surface data file of each depression are specifically as follows:

[0084] Gridding the image, dividing the binary image of depression distribution into uniform grids to ensure the integrity of each pixel;

[0085] Contour line generation: for each grid, check the values ​​of the pixels at both ends of its four sides; if the pixel values ​​on both sides of an edge are different, record the index of the edge and the coordinates of the two endpoints; when processing adjacent grids, use the state information of the shared boundary to reduce repeated calculations; for the outer edge of the grid located at the edge of the image, if one side of the pixel value is 1, record the relevant information to prevent the loss of contour information; finally, connect the adjacent points in all grids according to the recorded edge index to form a complete contour line;

[0086] Process the inner and outer contours and calculate the area and center of gravity of each contour. When the area of ​​contour A is smaller than that of contour B and the center of gravity of contour A is within the area enclosed by contour B, contour B is judged to be the outer contour and contour A is its corresponding inner contour. The coordinates of the outer contour are stored in a clockwise direction and the coordinates of the inner contour are stored in a counterclockwise direction, and the result is finally output as a vector surface data file.

[0087] In this embodiment, the original SRTM DEM data has been resampled to a resolution of 30 meters, so the grid size is set to 30m×30m to ensure the integrity of each pixel.

[0088] As a preferred implementation of this embodiment, the steps of respectively calculating the volume of each depression according to the vector surface data of the position of each depression are specifically as follows:

[0089] The multi-threaded parallel calculation of the vector surface is realized by the partial reading method. When processing each vector surface, the depth data of the depression in the corresponding range is firstly extracted according to its bounding box, and the bounding box is the minimum rectangular box containing the vector surface; then a mask of the same range is created, and each pixel is traversed to determine its spatial relationship with the vector surface, and only the pixels located in the vector surface are retained; finally, the valid pixels in the range are calculated to obtain the volume of the corresponding depression. The specific calculation formula is as follows:

[0090]

[0091] Where V a represents the volume corresponding to the Ath vector surface; i represents the i-th pixel; n represents the number of pixels in the Ath vector surface; h i represents the depth value corresponding to the i-th pixel; S represents the area of ​​each pixel.

[0092] As a preferred implementation of this embodiment, the steps of calculating the water storage volume of different depth levels in each depression, and accumulating them level by level to generate a binary image of the corresponding range of the water storage volume level by level corresponding to each depression are specifically as follows:

[0093] Traverse each depression vector surface data file, first obtain the depression depth value of the corresponding range of its bounding box, then create a mask of the same range, sort it from large to small by depth value, and the pixel with the larger value will be submerged first, and the number of unique values ​​is recorded as l;

[0094] Get the adjacent values ​​of the depression depth value and Calculate the volume of each layer And the calculation is carried out in the order of the depth of the depression from small to large. The specific calculation formula is as follows:

[0095]

[0096] In the formula, is the volume of each depth level, is the number of pixels corresponding to each depth value, and are the depth values of each depth level and its adjacent levels;

[0097] In this embodiment, considering that in most cases, the depth difference of adjacent depressions is small, while the difference between each volume level is large, the efficiency of traversing layer by layer is low. Therefore, in this solution, the next level of the i-th level is not i + 1 but i + a (a ∈ [1, 10, 100, 1000], and the value of a is determined by the following conditions: i + a < l and At the same time, indicates that the highest volume level has been reached. At this time, all the pixels in the subsequent levels meet this condition, and the traversal process stops, completing the operation on the depression depth values within the vector surface.

[0099] Accumulate the volumes of each depth level to obtain and judge the classification of the depression volume to which it belongs, and store the pixel position and level information in the database; at the same time, record the information of the processed data by establishing a transaction log to ensure that the data can be successfully restored after the processing is interrupted;

[0100] In this embodiment, this step selects to store in the database instead of outputting as a raster image. The reason is that when processing a large amount of data, the operation is likely to be interrupted due to various accidents. Directly writing out the result usually requires waiting for all the data processing to be completed. If interrupted, the result may be lost.

[0101] Finally, create several zero-value images with the same range and pixel size as the original image, and assign the value 1 to the corresponding level pixel positions stored in the database, so as to generate a binary image corresponding to the gradually accumulated water storage volume range.

[0102] In this embodiment, since the volume range of the depression is divided into four above, the number of zero-value images created during the creation is also four.

[0103] As a preferred implementation manner of this embodiment, the step of integrating the calculated multi-dimensional attribute information of each depression into the vector surface data file of each depression and simplifying the boundary of the vector surface is specifically as follows:

[0104] Based on each vector surface data file, calculate the area of each triangle formed by three consecutive points. For point P i , calculate the area of triangle (P i-1 , P i , P i+1 ), and associate each point with its corresponding area. The specific calculation formula is as follows;

[0105]

[0106] Sort by area from small to large, find the point with the smallest area and remove it, then update the area of ​​the adjacent triangles. Continue this process until the minimum area is greater than the set threshold S T ;

[0107] Finally, the vector surface is updated to the simplified point set.

[0108] In this embodiment, the multi-threaded parallel processing method is also used to extract the vector surface corresponding to the water storage level step by step, and the maximum depth within each vector surface is obtained by combining the depression depth value image, and the area of ​​each vector surface is calculated at the same time. So far, according to the above steps, multi-dimensional information such as the area, depth, volume level of the depression and the corresponding range of different water storage levels is obtained.

[0109] In order to improve the efficiency of data storage and slice publishing while maintaining the integrity of surface features, the Visvalingam-Whyatt algorithm is used to simplify each vector surface and extract the boundary conditions of the vector surface.

[0110] Embodiment 2:

[0111] The present embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for extracting multi-dimensional information and vector boundaries of a depression based on a DEM as described in any embodiment of the present invention is implemented.

[0112] Embodiment three:

[0113] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for extracting multi-dimensional information and vector boundaries of a depression based on a DEM as described in any embodiment of the present invention.

[0114] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for extracting multidimensional information and vector boundaries of depressions based on DEM, characterized in that: The specific steps include: The SRTM DEM data was converted into Mercator plane projection using the secondary convolution sampling method, and then the depression location was calculated and determined using the depression filling method, and the depression depth distribution map was generated. The depression depth distribution map is processed using preset rules to obtain a binary image of the depression distribution, and the binary image of the depression distribution is morphologically processed to fill the small holes in the depression area, while removing the fragmented depression surface and retaining its main shape; Accurately extract the contours of each depression from the binary image of depression distribution, and generate vector surface data files of each depression; The corresponding pixel values ​​of the depression depth distribution map and the binary image of the depression distribution are multiplied to remove the depression depth values ​​at the positions that are not involved in the calculation; the volume of each depression is calculated respectively in combination with the vector surface data of each depression position, and the volume of the depression is classified; Calculate the water storage volume of different depth levels in each depression, and accumulate them level by level to generate a binary image of the corresponding range of water storage volume of each depression; The calculated multi-dimensional attribute information of each depression is integrated into the vector surface data file of each depression, wherein the multi-dimensional attribute information of the depression includes the depth, contour, area, total volume and the corresponding range of water storage volume at different depth levels of the depression; and the boundary of the vector surface is simplified.

2. The method for extracting multidimensional information and vector boundaries of depressions based on DEM according to claim 1, characterized in that: The steps of calculating and determining the depression position and generating the depression depth distribution map are specifically as follows: By calculating the height relationship between each pixel and all pixels in its neighborhood, the depressions that are lower than the surrounding pixels are identified; Find the pour point closest to each sink point, that is, the boundary pixel with the lowest elevation in the confluence area; The height value of each depression pixel is raised to the height of the nearest pouring point until all depressions are filled. The height data obtained by filling the depressions is subtracted from the original DEM data to obtain the height data of the depressions and generate a depression depth distribution map.

3. The method for extracting multidimensional information and vector boundaries of depressions based on DEM according to claim 1 is characterized in that: The specific steps of processing the depression depth distribution map using preset rules to obtain a binary image of the depression distribution are: The height data of the depression is the depth of the depression. The pixels with a depth less than or equal to 1 meter are eliminated, and the pixels with a depth greater than 1 meter are set to 1, and the pixels with a depth less than or equal to 1 meter are set to 0, to obtain a binary image of the depression distribution.

4. The method for extracting multidimensional information and vector boundaries of depressions based on DEM according to claim 1, characterized in that: The steps of performing morphological processing on the binary image of the depression distribution, filling the small holes in the depression area, and removing the fragmented depression surface while retaining its main shape are specifically as follows: Invert the input binary image, changing pixel value 0 to 1 and 1 to 0; Apply a dilation operation to the inverted image to construct a 3×3 structure element with each pixel value of 1. Move the structure element to align the center of the structure element with each foreground pixel. If any part of the structure element covers a foreground pixel, set the pixel and its neighborhood to 1; Perform an erosion operation on the expanded image, also using a 3×3 structure element; for each foreground pixel, check whether the structure element completely falls in the foreground area. If so, keep the pixel as a foreground pixel, otherwise set it to the background; The processed image is inverted again to convert the background area into holes, thereby generating a filled binary image; Finally, an opening operation is performed, that is, the filled image is first expanded and then eroded.

5. The method for extracting multidimensional information and vector boundaries of depressions based on DEM according to claim 1, characterized in that: The steps of accurately extracting the contours of each depression from the binary image of the depression distribution and generating the vector surface data file of each depression are specifically as follows: Gridding the image, dividing the binary image of depression distribution into uniform grids to ensure the integrity of each pixel; Contour line generation: for each grid, check the values ​​of the pixels at both ends of its four sides; if the pixel values ​​on both sides of an edge are different, record the index of the edge and the coordinates of the two endpoints; when processing adjacent grids, use the state information of the shared boundary to reduce repeated calculations; for the outer edge of the grid located at the edge of the image, if one side of the pixel value is 1, record the relevant information to prevent the loss of contour information; finally, connect the adjacent points in all grids according to the recorded edge index to form a complete contour line; Process the inner and outer contours and calculate the area and center of gravity of each contour. When the area of ​​contour A is smaller than that of contour B and the center of gravity of contour A is within the area enclosed by contour B, contour B is judged to be the outer contour and contour A is its corresponding inner contour. The coordinates of the outer contour are stored in a clockwise direction and the coordinates of the inner contour are stored in a counterclockwise direction, and the result is finally output as a vector surface data file.

6. The method for extracting multidimensional information and vector boundaries of depressions based on DEM according to claim 1, characterized in that: The steps of calculating the volume of each depression according to the vector surface data of each depression position are specifically as follows: The multi-threaded parallel calculation of the vector surface is realized by the partial reading method. When processing each vector surface, the depth data of the depression in the corresponding range is firstly extracted according to its bounding box, and the bounding box is the minimum rectangular box containing the vector surface; then a mask of the same range is created, and each pixel is traversed to determine its spatial relationship with the vector surface, and only the pixels located in the vector surface are retained; finally, the valid pixels in the range are calculated to obtain the volume of the corresponding depression. The specific calculation formula is as follows: Where V A represents the volume corresponding to the Ath vector surface; i represents the i-th pixel; n represents the number of pixels in the Ath vector surface; h i represents the depth value corresponding to the i-th pixel; S represents the area of ​​each pixel.

7. The method for extracting multidimensional information and vector boundaries of depressions based on DEM according to claim 1, characterized in that: The steps of calculating the water storage volume of different depth levels in each depression, and accumulating them level by level to generate a binary image of the corresponding range of the water storage volume level by level corresponding to each depression are specifically as follows: Traverse each depression vector surface data file, first obtain the depression depth value of the corresponding range of its bounding box, then create a mask of the same range, sort it from large to small by depth value, and the pixel with the larger value will be submerged first, and the number of unique values ​​is recorded as l; Get the adjacent values ​​of the depression depth value and Calculate the volume of each layer And the calculation is carried out in the order of the depth of the depression from small to large. The specific calculation formula is as follows: In the formula, is the volume of each depth level, is the number of pixels corresponding to each depth value, and is the depth value of each depth level and its adjacent levels; The volume of each depth level is accumulated to obtain And judge The depression volume is classified and the pixel location and level information is stored in the database; at the same time, the information of the processed data is recorded by establishing a transaction log to ensure that the data can be smoothly restored after the processing is interrupted; Finally, several zero-value images with the same range and pixel size as the original image are created, and the corresponding level pixel positions stored in the database are assigned a value of 1, thereby generating binary images of the corresponding range of the step-by-step water storage volume.

8. The method for extracting multidimensional information and vector boundaries of depressions based on DEM according to claim 1, characterized in that: The steps of integrating the calculated multi-dimensional attribute information of each depression into the vector surface data file of each depression and simplifying the boundary of the vector surface are specifically as follows: Based on each vector surface data file, calculate the area of ​​each triangle formed by three consecutive points. i , calculate the triangle (P i-1 ,P i ,P i+1 ) and associate each point with its corresponding area. The specific calculation formula is as follows; Sort by area from small to large, find the point with the smallest area and remove it, then update the area of ​​the adjacent triangles. Continue this process until the minimum area is greater than the set threshold S T ; Finally, the vector surface is updated to the simplified point set.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for extracting multi-dimensional information and vector boundaries of depressions based on DEM is implemented as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for extracting multi-dimensional information and vector boundaries of a depression based on a DEM is implemented as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for accurately identifying farmland depression features based on digital terrain model

    CN115839707A

Cited By

  • DEM data-based polder area boundary extraction method

    CN120807566A

  • Method for extracting and quantifying the morphology of candidate depression watershed based on water immersion simulation

    CN122675874A