Disclosure of Invention
The application aims to provide a river channel terrain modeling method and a related device based on data interpolation, which can realize high-precision generation of a river basin river channel triangular grid model and provide terrain data support for two-dimensional hydrodynamic model modeling.
In order to achieve the above object, the present application provides the following solutions:
In a first aspect, the present application provides a river terrain modeling method based on data interpolation, including:
The method comprises the steps of obtaining river channel image data and actually measured cross section elevation data, wherein the river channel image data are used for representing the trend of a river channel, and the actually measured cross section elevation data at least comprise elevation data of characteristic points on each cross section.
And drawing a plurality of river lines based on the river image data, wherein the river lines at least comprise river lines passing through each characteristic point on each cross section.
And interpolating the river line according to the elevation data of the intersection point of the river line and the two adjacent cross sections aiming at any river line to obtain the elevation data of each interpolation point on the river line.
And connecting a plurality of river channels of the main stream with a plurality of river channels of the tributary at the junction of the main stream and the tributary to obtain river basin elevation data, wherein the river basin river channel elevation data comprises elevation data of a plurality of river channels of the main stream, a plurality of river channels of the tributary and interpolation points on each river channel.
And generating a river basin river channel triangular grid model based on river basin river channel elevation data, and interpolating the river basin triangular grid by using an inverse distance weighting method to obtain a high-precision river basin river channel triangular grid model.
Optionally, each characteristic point on the cross section comprises a left base point, a left bank top point, a left bank river bottom point, a river middle point, a right bank river bottom point, a right bank top point and a right base point from left to right.
Optionally, drawing a plurality of river lines based on river image data, specifically including the following steps:
and drawing river lines passing through the same characteristic points on different cross sections according to the river image data.
And interpolating the cross section according to the elevation data of the two feature points aiming at any two adjacent feature points on the cross section to obtain the elevation data of the cross section interpolation points.
And drawing river lines passing through interpolation points of the same cross section on different cross sections according to the river image data.
Optionally, at the junction of the main and branch streams, connecting a plurality of river lines of the main stream with a plurality of river lines of the branch streams, cutting off the river lines at the same elevation of the river lines of the main stream and the branch streams based on the principle of guaranteeing the river connectivity, and reserving elevation points with lower elevation values.
Optionally, at the junction of the main and branch streams, a plurality of river lines of the main stream and a plurality of river lines of the branch stream are connected, and the method specifically comprises the following steps:
And judging the connection rule of the river lines of the dry tributaries according to the direction of the tributaries converging into the dry stream.
If the tributary is gathered from the left side of the main stream, the river lines at the two sides of the tributary are connected with the left river line of the main stream, and the river lines of the tributary are sequentially connected with the river line of the main stream until the center river line of the tributary is connected with the center river line of the main stream.
If the tributary is gathered from the right side of the main stream, the river lines at the two sides of the tributary are connected with the right river line of the main stream, and the river lines of the tributary are sequentially connected with the river line of the main stream until the center river line of the tributary is connected with the center river line of the main stream.
Optionally, blueKenue software is used to generate a river basin river triangle mesh model.
In a second aspect, the present application provides a river terrain modeling system based on data interpolation, including:
the river channel data acquisition module is used for acquiring river channel image data and actually measured cross section elevation data, wherein the river channel image data are used for representing the trend of a river channel, and the actually measured cross section elevation data at least comprise elevation data of each characteristic point on each cross section.
The river line drawing module is used for drawing a plurality of river lines based on river image data, and the river lines at least comprise river lines passing through each characteristic point on each cross section.
The interpolation point elevation determining module is used for interpolating the river line according to elevation data of two adjacent cross sections of the river line aiming at any river line to obtain elevation data of each interpolation point on the river line.
The river basin river course line elevation data comprises elevation data of a plurality of main stream river course lines, a plurality of tributary river course lines and interpolation points on each river course line in the river basin.
The river channel triangular grid interpolation module is used for generating a river channel triangular grid model based on river channel elevation data of the river channel, and interpolating the river channel triangular grid by using an inverse distance weighting method to obtain the river channel triangular grid model with high precision.
In a third aspect, the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program to perform the steps of the data interpolation based river topography modeling method described hereinbefore.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data interpolation based river topography modeling method described hereinbefore.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the data interpolation-based river topography modeling method described hereinbefore.
According to the specific embodiment provided by the application, the application discloses the following technical effects:
The application provides a river channel topography modeling method and a related device based on data interpolation, wherein in the method, river channel image data and actually measured cross section elevation data are firstly obtained; the method comprises the steps of drawing a plurality of river channels based on river channel image data, interpolating the river channels according to elevation data of intersection points of the river channels and two adjacent cross sections aiming at any drawn river channel line to obtain elevation data of each interpolation point on the river channels, connecting the river channels of a main stream with the river channels of a tributary at the intersection point of the main stream and the tributary to obtain river channel elevation data, generating a river channel triangular grid model of the river channel based on the river channel elevation data, and interpolating the river channel triangular grid model of the river channel by using an inverse distance weighting method to obtain a river channel triangular grid model of the river channel with high precision. The river terrain modeling method provided by the application can generate densely and uniformly distributed elevation point data based on river cross section data and public river image data, provides terrain data support for two-dimensional hydrodynamic model modeling, and is beneficial to improving the modeling accuracy of the hydrodynamic model.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The foregoing objects, features, and advantages of the application will be more readily apparent from the following detailed description of the application when taken in conjunction with the accompanying drawings and detailed description.
In an exemplary embodiment, as shown in fig. 1, there is provided a river terrain modeling method based on data interpolation, including the steps of:
A1, acquiring river channel image data and actually measured cross section elevation data, wherein the river channel image data are used for representing the trend of a river channel, and the actually measured cross section elevation data at least comprise elevation data of characteristic points on each cross section. The characteristic points on the cross section from left to right comprise a left base point, a left bank top point, a left bank river bottom point, a river middle point, a right bank river bottom point, a right bank top point and a right base point, and are shown in the figure 2.
A2, drawing a plurality of river lines based on river image data, wherein the river lines at least comprise river lines passing through each characteristic point on each cross section. In this embodiment, the step A2 specifically includes the following steps:
A21, drawing river lines passing through the same characteristic points on different cross sections according to river image data. The drawing results of the river lines passing through the same characteristic points on different cross sections are shown in fig. 3.
A22, interpolating the cross section according to the elevation data of any two adjacent characteristic points on the cross section to obtain the elevation data of the cross section interpolation point.
A23, drawing river lines passing through interpolation points of the same cross section on different cross sections according to river image data.
A3, interpolating the river line according to the elevation data of the intersection point of the river line and the two adjacent cross sections aiming at any river line to obtain the elevation data of each interpolation point on the river line, as shown in fig. 3.
And A4, at the junction of the main stream and the branch stream, connecting a plurality of river channels of the main stream with a plurality of river channels of the branch stream to obtain river basin elevation data, wherein the river basin river channel elevation data comprises the elevation data of a plurality of main stream river channels, a plurality of branch stream river channels and interpolation points on each river channel. In this embodiment, the step A4 specifically includes the following steps:
A41, judging the line connection rule of the river channel of the dry tributary according to the direction of the branch flow converging into the dry flow.
A42, a plurality of tributaries are gathered from the left side of the main stream, two side river lines of the tributaries are connected with the left side river line of the main stream, and the river lines of the tributaries are sequentially connected with the river lines of the main stream until the central river line of the tributary is connected with the central river line of the main stream.
A43, a plurality of tributaries are gathered from the right side of the main stream, two side river lines of the tributaries are connected with the right side river line of the main stream, and the river lines of the tributaries are sequentially connected with the river lines of the main stream until the central river line of the tributaries is connected with the central river line of the main stream.
Specifically, at the junction of the main and branch streams, a plurality of river lines of the main stream and a plurality of river lines of the branch streams are connected, and on the basis of the principle of guaranteeing river connectivity, the river lines of the main stream and the branch streams are cut off at the same elevation of the river lines, and elevation points with lower elevation values are reserved.
A5, generating a river basin triangular grid model based on river basin elevation data, and interpolating the river basin triangular grid by using an inverse distance weighting method to obtain a high-precision river basin triangular grid model. In this embodiment, blueKenue software is used to generate the river basin triangular mesh model, and BlueKenue software is also used for triangular mesh interpolation.
The river topography modeling method based on data interpolation provided by the embodiment of the application is introduced below by taking a river channel in Shandong province as a research object. The main stream length is about 2km and the width is about 40-60 m, one branch stream is arranged in the middle, and the branch stream length is about 150m and the width is about 10m.
In this example, the river terrain modeling method based on data interpolation specifically includes the following steps:
b1, acquiring public high-definition image data and measured cross section high-precision elevation data of the river channel.
The high-definition image data selects the satellite image data of the sky map, and the data can be dynamically displayed in QGIS geographic information systems in the form of xyz tiles according to the OGC WMTS standard, so that the follow-up operation is facilitated. The measured cross section high-precision elevation data are provided by local water conservancy departments, and the data content comprises longitude and latitude coordinates and elevation of 7 cross section characteristic points of a left base point, a left bank top point, a left bank river bottom point, a river middle point, a right bank river bottom point, a right bank top point and a right base point of a river channel. The longitude and latitude coordinates are accurate to 7 positions behind decimal points, and the elevation precision is in the centimeter level.
And B2, drawing a longitudinal river line according to the public high-definition image data and the measured cross section high-precision elevation data of the river.
And manually drawing a plurality of longitudinal river lines, wherein the longitudinal river lines at least comprise 7 river lines penetrating through the left base point, the left bank top point, the left bank river bottom point, the river middle point, the right bank river bottom point, the right bank top point and the right base point of each cross section, and 2 river lines are added among the left bank river bottom point, the river middle point and the right bank river bottom point, and 9 river lines are added in total. The river line at the top of the left bank/the river line at the top of the right bank is close to the left bank/the right bank of the river in the image, and the river line at the middle point of the river is consistent with the river trend in the image.
And B3, interpolating the elevation of the intersection point of each river channel line and the cross section based on the measured cross section high-precision elevation data.
For each of the 9 river lines, determining the intersection point of the 9 river lines with each cross section, and interpolating the elevation of the intersection point by using a linear interpolation method according to the elevation data of each cross section characteristic point (left base point, left bank top point, left bank bottom point, river middle point, right bank bottom point, right bank top point and right base point).
And B4, interpolating the elevations of each point on the river line between the cross sections according to the elevations of the adjacent cross sections.
For each river line, the elevation of the river line between the adjacent cross sections is interpolated by a linear interpolation method according to the elevation of the intersection point of each river line and each adjacent two cross sections, and 200 points are interpolated between each two cross sections, so that dense and evenly distributed elevation points are generated.
And B5, connecting the river line of the main stream and the river line of the tributary at the river junction.
For the bifurcated river, the river lines are cut off at the same elevation at the river junction, and the elevation points with lower elevation values are reserved, so that the connectivity of the river is ensured, and the connection mode of the main and branch river lines is shown in figure 4.
And B6, generating a river basin river channel triangular grid model, and carrying out river basin triangular grid interpolation to generate a high-precision river basin river channel triangular grid model.
And interpolating the river triangular grid by using an inverse distance weighting method based on the elevation points, and modeling a hydrodynamic model. The river triangular network is generated by BlueKenue software, the grid side length is about 4m, the elevation point interpolation is also operated by BlueKenue software, and the form of interpolation of the river triangular network is shown in fig. 5.
The embodiment of the application provides a river channel topography modeling method based on data interpolation, which comprises the steps of firstly obtaining river channel image data and actually measured cross section elevation data, then drawing a plurality of river channel lines based on the river channel image data, interpolating the river channel lines according to elevation data of intersection points of the river channel lines and two adjacent cross sections aiming at any drawn river channel line to obtain elevation data of each interpolation point on the river channel lines, connecting the river channel lines of a main stream with the river channel lines of a tributary at the intersection of the main stream and the tributary stream to obtain river channel elevation data, and finally generating a river channel triangular grid model of the river channel based on the river channel elevation data, and interpolating the river channel triangular grid by using an inverse distance weighting method to obtain a river channel triangular grid model of the river channel with high precision. The method can generate densely and uniformly distributed elevation point data based on river cross section data and public river image data, provides terrain data support for modeling of the two-dimensional hydrodynamic model, and is beneficial to improving modeling accuracy of the hydrodynamic model.
Based on the same inventive concept, the embodiment of the application also provides a system for realizing the river channel terrain modeling method based on the data interpolation. The implementation of the solution provided by the system is similar to that described in the above method, so the specific limitation in one or more system embodiments provided below may be referred to above as limitation on the river channel topography modeling method based on data interpolation, and will not be described herein.
In one exemplary embodiment, as shown in fig. 6, a river terrain modeling system based on data interpolation is provided, comprising the following modules:
the river channel data acquisition module is used for acquiring river channel image data and actually measured cross section elevation data, wherein the river channel image data are used for representing the trend of a river channel, and the actually measured cross section elevation data at least comprise elevation data of each characteristic point on each cross section.
The river line drawing module is used for drawing a plurality of river lines based on river image data, and the river lines at least comprise river lines passing through each characteristic point on each cross section.
The interpolation point elevation determining module is used for interpolating the river line according to elevation data of two adjacent cross sections of the river line aiming at any river line to obtain elevation data of each interpolation point on the river line.
The river basin river course line elevation data comprises elevation data of a plurality of main stream river course lines, a plurality of tributary river course lines and interpolation points on each river course line in the river basin.
The river channel triangular grid interpolation module is used for generating a river channel triangular grid model based on river channel elevation data of the river channel, and interpolating the river channel triangular grid by using an inverse distance weighting method to obtain the river channel triangular grid model with high precision.
Of course, the architecture shown in fig. 6 is merely exemplary, and one or at least two components of the system shown in fig. 6 may be omitted as actually needed when implementing different functions.
In an exemplary embodiment, a computer device, which may be a server or a terminal, is provided, and an internal structure thereof may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by the processor is used for realizing a river terrain modeling method based on data interpolation.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an exemplary embodiment, a computer device is also provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In an exemplary embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method embodiments described above.
In an exemplary embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive RandomAccess Memory, MRAM), ferroelectric Memory (Ferroelectric RandomAccess Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (RandomAccess Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static RandomAccess Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM), etc.
The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The principles and embodiments of the present application have been described herein with reference to specific examples, which are intended to facilitate an understanding of the principles and concepts of the application and are to be varied in scope and detail by persons of ordinary skill in the art based on the teachings herein. In view of the foregoing, this description should not be construed as limiting the application.