CN113706703A - Automatic boundary generating method for DTM model - Google Patents
Automatic boundary generating method for DTM model Download PDFInfo
- Publication number
- CN113706703A CN113706703A CN202110998990.2A CN202110998990A CN113706703A CN 113706703 A CN113706703 A CN 113706703A CN 202110998990 A CN202110998990 A CN 202110998990A CN 113706703 A CN113706703 A CN 113706703A
- Authority
- CN
- China
- Prior art keywords
- triangle
- value
- boundary
- storing
- neighbor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/005—Tree description, e.g. octree, quadtree
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Computer Graphics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Remote Sensing (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides a method for automatically generating a boundary by a DTM model, which comprises the following steps: s1: inputting point cloud data to generate a DTM model; s2: generating topological data for an irregular triangular network in the DTM model by using a red-black binary tree; s3: the topology data of S2 is read and a boundary is generated. The automatic generation boundary of the DTM model provided by the invention is simple and efficient, redundant data in the DTM model is removed, and the method has certain reference significance for improving the automation degree of the DTM method for calculating the earth volume.
Description
Technical Field
The invention relates to earth volume calculation, in particular to a method for automatically generating a boundary by a DTM model.
Background
The DTM model is a digital representation of topographical attributes, and is a digital description with spatial location features and topographical attributes, such as ground temperature, rainfall, earth magnetism, gravity, land use, soil type, and other ground features. Alternatively, the digital ground model is a database representing the spatial distribution of ground features, and is typically constructed by forming a data array from a series of ground point coordinates (x, y, z) and surface attributes (object type, features, etc.).
The model is usually based on a triangular mesh or a grid, and in terms of calculation of the earth volume, a TIN method is generally used. It mainly proceeds with a contiguous triangular configuration by discrete data points, thus obtaining a mesh structure. The earth volume calculation based on the model can reasonably use the measured discrete elevation points, the terrain feature points and the like to construct the triangulation network. When field measurement is carried out in a project area, the topographic feature points are collected based on the topographic relief condition, and the digital ground model obtained through the measured data has good authenticity and can be very close to the real topographic characteristics. The method is very suitable for areas with relatively complex terrain conditions. After the triangular network is constructed, the calculation can be carried out through the triangular network, firstly, the volumes corresponding to the triangular prisms formed by the triangles are calculated, and then the volumes of all the triangular prisms are added to obtain the total filling amount and the excavation amount.
The digital ground model method can be well adapted to different terrains, relevant characteristics of the earth surface are matched better, and calculation efficiency and accuracy are improved remarkably. When the method is used for calculating the earth volume, the earth volume is finally realized mainly through the volume of the triangular prism, the calculation of the earth volume by the DTM method is mostly calculated by using a computer at present, and the calculation roughly comprises the following steps:
1) acquiring a three-dimensional coordinate point file acquired by field measurement, and selecting a proper scale to complete point spreading operation;
2) drawing a boundary, manually connecting boundary points needing earthwork calculation in software to form a closed boundary, and determining a calculated earthwork amount range;
3) establishing a DTM for three-dimensional points in the boundary according to the coordinate point file;
4) because triangles which do not accord with the actual situation exist in the generated triangulation network, partial triangles of the triangulation network need to be deleted manually;
5) carrying out earth volume calculation on the modified triangular net;
in the step of calculating the earth volume by the DTM method, the drawing of the boundary and the modification of the triangulation network need manual operation, so that the calculation speed is greatly reduced, and the human resources and the cost are increased.
Disclosure of Invention
Aiming at the technical problems, the invention provides a method for automatically generating the boundary by the DTM model, which reduces the labor cost input and improves the earth volume calculation speed.
The specific technical scheme is as follows:
a method for automatically generating a boundary by a DTM model comprises the following steps:
s1: inputting point cloud data to generate a DTM model;
s2: generating topological data for an irregular triangular network in the DTM model by using a red-black binary tree;
s3: the topology data of S2 is read and a boundary is generated.
Wherein the S2 includes the steps of:
s2.1: firstly, establishing a structure body m _ out, and storing four arrays of pointlist, pointattebutelist, trianglelist and neighborlist in the structure body; wherein pointlist is used for storing plane coordinates of triangle points, pointattebutelist is used for storing elevation coordinates of triangle points, trianglelist is used for storing triangle vertex sequence numbers, neighborlist is used for storing three adjacent triangle sequence numbers of each side of a triangle, and-1 represents that no adjacent triangle exists in the direction;
s2.2: establishing a red-black binary tree, iterating each triangle in the DTM, setting an index value for each point of each triangle, setting an initial value to be 0, adding 1 according to the iteration times, and then adding the points into the tree according to a red-black binary tree rule;
s2.3: setting each value in the neighborlist array as-1, iterating each triangle, searching the point of the triangle in a red-black binary tree, returning the index value of the point, storing the plane coordinate of the point in a pointlist, and setting the keyword value according to the index value; storing the elevation value of the point into pointattribute, and setting a keyword value according to the index value; storing the vertex of the point into trianglelist, starting the initial value of the key word value from 0, and adding 1 according to the iteration times;
s2.4: setting an initial value of 0, adding an integer variable nTRICount of 1 along with the iteration times, and establishing a data structure map container neighbor bour map, wherein two member variables are composed of structure templates, the first member variable is a triangle side, the second member variable is a serial number of a left triangle and a right triangle at the current side, the two member variables of the pair are composed of integer variables, index values of three points in the triangle iterated in S2.3 form a side in pairs, the side is stored in the pair before the index value is small, the side is placed in the neighbor bour map for searching, if the side is not found, the side is stored in the first member variable of the neighbor bour map, and the front variable and the rear variable of the second member variable in the neighbor bour map are respectively set to be-1 and the neighbor count; if the edge is found, updating two member variables of the value in the neighbor bourMap by taking the edge as a key word;
s2.5: setting an integer variable num with an initial value of 0, iterating each triangle, forming an edge by three points in each triangle, setting an index value according to the point, storing the edge as a keyword, searching the neighbor bourmap in S2.4 by taking the edge as the keyword to obtain a second member variable of the neighbor bourmap, assigning the variable to the num if the variable is not equal to the index value of the current triangle, and finally storing the num in the neighbor box, wherein the keyword is set according to the index value of the current triangle; and finishing generating the topological data.
Wherein the step S3 includes the steps of:
s3.1: establishing a data structure map container bndTable, iterating the m _ out triangle in S2, checking whether the adjacent triangle value of each edge is-1 for the current triangle in neighborlist, if not, -1, jumping to the next triangle, if-1, storing the two vertexes of the edge in the triangle index value and the triangle index value nTRICount into the bndTable, and finishing searching the triangle index value with the boundary in the DTM model and the vertex sequence number of the boundary edge in the triangle;
s3.2: in order to better fit the DTM model, removing redundant data in the DTM model, establishing a data structure pt for storing plane coordinates and elevation point information of boundary points, iterating each triangle of the bndTable in S3.1, calculating an inverse cosine value of a third vertex except the vertex contained in the boundary edges by using a cosine law, and if the inverse cosine value is smaller than a threshold value, keeping the vertex sequence number of the boundary edges; otherwise, if the inverse cosine value is larger than a certain threshold value, the vertex sequence numbers of the other two sides of the triangle are reserved; using the vertex sequence number obtained after iteration as a keyword, extracting coordinate point information from the pointlist and the pointattribute in the m _ out, and storing the coordinate point information into the pt, wherein the extraction of the boundary point information is finished;
s3.3: and drawing the boundary points extracted in the S3.2.
Preferably, the threshold value in S3.2 is set to 90 °.
According to the method for automatically generating the boundary of the DTM model, the automatic boundary generation of the DTM model is simple and efficient, redundant data in the DTM model are removed, and the method has certain reference significance for improving the automation degree of earth volume calculation by the DTM method.
Drawings
FIG. 1 is an overall flowchart of the DTM model generation boundary of the present invention;
FIG. 2 is a flowchart of the DTM model generation topology data of step S2 of the present invention;
FIG. 3 is a flowchart of the topology data extraction boundary point of step S3 according to the present invention;
FIG. 4 is a DTM model diagram of the three-dimensional point cloud data of the embodiment;
FIG. 5 is a DTM model generation boundary line of an embodiment;
fig. 6 is a diagram illustrating calculation of the earth volume by the DTM method of the example.
Detailed Description
The specific technical scheme of the invention is described by combining the embodiment.
As shown in fig. 1, a method for automatically generating a boundary by a DTM model includes the following steps:
s1: inputting point cloud data to generate a DTM model;
s2: generating topological data for an irregular triangular network in the DTM model by using a red-black binary tree; the specific steps are shown in figure 2;
s3: the topological data of S2 is read to generate boundaries, and the specific steps are shown in fig. 3.
In the embodiment, the visual stoidio 2019 platform is used for automatically drawing the boundary of the DTM model, so that the labor cost input can be reduced, the earth volume calculation speed can be increased, the triangular net can be contracted, and redundant data can be removed.
The embodiment is a new project from Yichun to Jinggang mountain highway to a new field in Yichun, Sanyang and Yuan province, wherein the project starting point is located near east 100 meters of the back of the Changjin in Sanyang town in Yuan State in Yichun, the project ending point is located near the Yangyu village which is 1.25 kilometers of the Huyun highway in the New field town in Yuan State in Yichun, a cross-shaped hub is arranged to connect the Huyun high speed and the Yuan high speed, and the route after the hub intercommunication is connected with the starting point of the new project from Yichun to Tuyuan highway in the initial design stage. The three yang towns, the lake field towns, the flood pond towns and the new field towns in the Yuanzhou region share one area, namely four towns, and the whole length of the route is 18.423 km. The main control points of the route are sequentially high-speed S81, Sanyang town, Hutian town, national G320, Hongtang town, New field town, Yichun city region, Hukun high-speed G60 and Yisui high-speed.
Firstly, a DTM model is established for the three-dimensional point cloud data of the project, as shown in FIG. 4, and secondly, a boundary is automatically generated for the DTM model, as shown in FIG. 5, and as can be seen in the figure, redundant data have been removed from the generated boundary as required. Finally, the earth volume calculation is performed on the model within the boundary, as shown in fig. 6, where the elevation is chosen to be 105 m.
Experimental results show that the automatic boundary generation of the DTM model can accelerate the calculation speed of the earth volume, save the cost and improve the automation degree.
The technical principle of the present invention is described above in connection with specific embodiments. The description is made for the purpose of illustrating the principles of the invention and should not be construed in any way as limiting the scope of the invention. Based on the explanations herein, those skilled in the art will be able to conceive of other embodiments of the present invention without inventive step, which shall fall within the scope of the appended claims.
Claims (4)
1. A method for automatically generating a boundary by a DTM model is characterized by comprising the following steps:
s1: inputting point cloud data to generate a DTM model;
s2: generating topological data for an irregular triangular network in the DTM model by using a red-black binary tree;
s3: the topology data of S2 is read and a boundary is generated.
2. The DTM model automatic boundary generation method of claim 1, wherein the step S2 comprises the steps of:
s2.1: firstly, establishing a structure body m _ out, and storing four arrays of pointlist, pointattebutelist, trianglelist and neighborlist in the structure body; wherein pointlist is used for storing plane coordinates of triangle points, pointattebutelist is used for storing elevation coordinates of triangle points, trianglelist is used for storing triangle vertex sequence numbers, neighborlist is used for storing three adjacent triangle sequence numbers of each side of a triangle, and-1 represents that no adjacent triangle exists in the direction;
s2.2: establishing a red-black binary tree, iterating each triangle in the DTM, setting an index value for each point of each triangle, setting an initial value to be 0, adding 1 according to the iteration times, and then adding the points into the tree according to a red-black binary tree rule;
s2.3: setting each value in the neighborlist array as-1, iterating each triangle, searching the point of the triangle in a red-black binary tree, returning the index value of the point, storing the plane coordinate of the point in a pointlist, and setting the keyword value according to the index value; storing the elevation value of the point into pointattribute, and setting a keyword value according to the index value; storing the vertex of the point into trianglelist, starting the initial value of the key word value from 0, and adding 1 according to the iteration times;
s2.4: setting an initial value of 0, adding an integer variable nTRICount of 1 along with the iteration times, and establishing a data structure map container neighbor bour map, wherein two member variables are composed of structure templates, the first member variable is a triangle side, the second member variable is a serial number of a left triangle and a right triangle at the current side, the two member variables of the pair are composed of integer variables, index values of three points in the triangle iterated in S2.3 form a side in pairs, the side is stored in the pair before the index value is small, the side is placed in the neighbor bour map for searching, if the side is not found, the side is stored in the first member variable of the neighbor bour map, and the front variable and the rear variable of the second member variable in the neighbor bour map are respectively set to be-1 and the neighbor count; if the edge is found, updating two member variables of the value in the neighbor bourMap by taking the edge as a key word;
s2.5: setting an integer variable num with an initial value of 0, iterating each triangle, forming an edge by three points in each triangle, setting an index value according to the point, storing the edge as a keyword, searching the neighbor bourmap in S2.4 by taking the edge as the keyword to obtain a second member variable of the neighbor bourmap, assigning the variable to the num if the variable is not equal to the index value of the current triangle, and finally storing the num in the neighbor box, wherein the keyword is set according to the index value of the current triangle; and finishing generating the topological data.
3. The DTM model automatic boundary generation method of claim 2, wherein the step S3 comprises the steps of:
s3.1: establishing a data structure map container bndTable, iterating the m _ out triangle in S2, checking whether the adjacent triangle value of each edge is-1 for the current triangle in neighborlist, if not, -1, jumping to the next triangle, if-1, storing the two vertexes of the edge in the triangle index value and the triangle index value nTRICount into the bndTable, and finishing searching the triangle index value with the boundary in the DTM model and the vertex sequence number of the boundary edge in the triangle;
s3.2: in order to better fit the DTM model, removing redundant data in the DTM model, establishing a data structure pt for storing plane coordinates and elevation point information of boundary points, iterating each triangle of the bndTable in S3.1, calculating an inverse cosine value of a third vertex except the vertex contained in the boundary edges by using a cosine law, and if the inverse cosine value is smaller than a threshold value, keeping the vertex sequence number of the boundary edges; otherwise, if the inverse cosine value is larger than a certain threshold value, the vertex sequence numbers of the other two sides of the triangle are reserved; using the vertex sequence number obtained after iteration as a keyword, extracting coordinate point information from the pointlist and the pointattribute in the m _ out, and storing the coordinate point information into the pt, wherein the extraction of the boundary point information is finished;
s3.3: and drawing the boundary points extracted in the S3.2.
4. The method of claim 3, wherein the threshold in S3.2 is set to 90 °.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110998990.2A CN113706703A (en) | 2021-08-28 | 2021-08-28 | Automatic boundary generating method for DTM model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110998990.2A CN113706703A (en) | 2021-08-28 | 2021-08-28 | Automatic boundary generating method for DTM model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113706703A true CN113706703A (en) | 2021-11-26 |
Family
ID=78656327
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110998990.2A Pending CN113706703A (en) | 2021-08-28 | 2021-08-28 | Automatic boundary generating method for DTM model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113706703A (en) |
-
2021
- 2021-08-28 CN CN202110998990.2A patent/CN113706703A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Jasiewicz et al. | A new GRASS GIS toolkit for Hortonian analysis of drainage networks | |
CN102298795B (en) | Three-dimensional segmenting method for STL (Standard Template Library) triangular network model | |
CN104835202A (en) | Quick three-dimensional virtual scene constructing method | |
CN114998338B (en) | Mining quantity calculation method based on laser radar point cloud | |
CN110544305B (en) | Terrain steeple ridge line information fusion method constructed by DEM (digital elevation model) oriented to regular grids | |
CN110955996B (en) | Method and system for simulating submerging process | |
CN112906096B (en) | Highway engineering design data reconstruction and analysis method and system | |
CN112150610A (en) | Retaining wall modeling method and system based on dimension marking | |
CN113342999B (en) | Variable-resolution-ratio point cloud simplification method based on multi-layer skip sequence tree structure | |
CN114648617A (en) | Water system extraction method based on digital elevation model DEM | |
CN112116709B (en) | Terrain characteristic line processing method for improving terrain expression precision | |
CN117034051B (en) | Water conservancy information aggregation method, device and medium based on BIRCH algorithm | |
CN113706703A (en) | Automatic boundary generating method for DTM model | |
CN112687007A (en) | LOD technology-based stereo grid map generation method | |
Pender et al. | 12 Flood Inundation Modelling to Support Flood Risk Management | |
CN112508264A (en) | Method for planning path of big data of power transmission line stock project by using genetic algorithm | |
CN114491897A (en) | Seismic wave numerical simulation method, device, medium and electronic equipment | |
CN110852551B (en) | Stock yard reserve calculation method | |
CN116385683B (en) | Three-dimensional small drainage basin channel fractal dimension calculation method and system | |
CN114049387B (en) | Tree skeleton extraction method based on 3D point cloud | |
CN115620171B (en) | Forest storage amount evaluation method, device, equipment and storage medium | |
CN117807782B (en) | Method for realizing three-dimensional simulation model | |
CN117456123B (en) | Method for generating digital elevation model based on point data | |
CN118298117A (en) | Three-dimensional multi-level geological model construction method | |
CN107833278A (en) | Terrain simulation method, apparatus and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |