Coastal wetland tidal creek network automatic grading and polymorphic parameter calculation method
By generating tidal channel centerlines, constructing topology trees, and storing them hierarchically, the inefficiency of automatic hierarchical classification and multi-morphological parameter calculation of tidal channel networks was solved, achieving efficient and accurate processing of tidal channel data and data adaptation for hydrological-geomorphological coupling simulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG LABORATORY OF SOUTHERN OCEAN SCIENCE AND ENGINEERING (GUANGZHOU)
- Filing Date
- 2026-03-11
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies cannot achieve fully automated classification and multi-morphological parameter calculation of coastal wetland tidal channel networks, resulting in low data processing efficiency, poor result consistency, and difficulty in generating formats recognizable by hydrological-geomorphological coupling simulation software.
By acquiring SHP format files of tidal channel edge points, the tidal channel centerline is generated and a topology tree is constructed. The data is then stored in a structured manner according to levels, various morphological parameters are calculated, and the data is converted into POL files that can be recognized by Delft3D software.
It achieves efficient and accurate processing and structured storage of tidal channel morphology data, generating a data format suitable for hydro-geomorphological coupling simulation, thereby improving data utilization and application efficiency.
Smart Images

Figure CN122019510A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks. Background Technology
[0002] Coastal wetlands are unique ecosystems formed by the interaction of land and sea, possessing important functions such as ecological regulation and carbon sequestration, and are a key component of the global ecological security framework. Tidal channel networks, as the core hydrological corridors within coastal wetlands, consist of main tidal channels, branches at various levels, and confluence points. Their morphological characteristics directly affect the hydrological connectivity efficiency, material transport processes, and organic carbon sequestration potential of wetlands, and also provide fundamental data support for coastal wetland geomorphological evolution simulation, ecological protection planning, and engineering design.
[0003] Currently, vector data (mostly in SHP format) of tidal channel edge points can be obtained through remote sensing image interpretation and field measurements. This data is the core foundation for subsequent tidal channel morphology analysis. However, a complete integrated solution has not yet been formed for the subsequent processing technology of this SHP format edge point data. The relevant technologies are still scattered in three independent stages, which has obvious limitations. Summary of the Invention
[0004] In view of this, embodiments of this application provide an automatic classification method and related equipment for tidal channel networks in coastal wetlands and calculation of multiple morphological parameters, so as to accurately classify tidal channels and improve the calculation efficiency of tidal channel morphological parameters.
[0005] One aspect of this application provides a method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks, the method comprising the following steps:
[0006] Obtain SHP format files of the edge points of the tidal channel network in coastal wetlands; wherein, the SHP format files include the two-dimensional coordinates and basic attribute information of the tidal channel edge points;
[0007] Generate the tidal channel centerline based on each of the tidal channel edge points in the SHP format file;
[0008] A topology tree is generated based on the centerline of the tidal channel and each edge point of the tidal channel;
[0009] The tidal channels are identified hierarchically according to the topology tree, and the identified tidal channels are stored in a structured manner according to their levels to obtain the structured data of the tidal channels;
[0010] Various morphological parameters of the tidal channel are calculated based on the structured data.
[0011] In some embodiments, generating the tidal channel centerline based on each of the tidal channel edge points in the SHP format file includes the following steps:
[0012] The spatial distribution of all the tidal channel edge points in the SHP format file is displayed through a visual interface; in response to the operator's selection operation in the visual interface based on the actual entry point of the tidal channel into the sea, the midpoint of the tidal channel into the sea is selected as the root node;
[0013] Starting from the root node, proceed towards the inner side of the tidal channel, select the two tidal channel edge points that are closest to the current cross section at a preset interval, then calculate the midpoint coordinates of the two tidal channel edge points and record them in the order of generation.
[0014] When four tidal channel edge points are identified, corresponding to the two sides of the two branches, they are determined to be forks. Using the depth-first principle, one branch is traversed completely to its end first, and then backtracked to the fork position to traverse the other branch. All midpoints are connected in the traversal order to form the center line of the tidal channel containing the main trunk and branches at all levels, and the generation order index of each midpoint is recorded synchronously.
[0015] In some embodiments, generating a topology tree based on the tidal channel centerline and each of the tidal channel edge points includes the following steps:
[0016] Traverse all midpoints of the center line of the tidal channel, count the number of tidal channel segments connected to each midpoint, and use the number of tidal channel segments as the degree of the point.
[0017] The root node, branching point, terminal point, and ordinary point are determined based on the degree of the points mentioned above;
[0018] Starting from the root node, the forward traversal adopts a left-first priority order; first, it fully traverses a branch to the end point, then backtracks to the nearest fork point and continues to traverse the unfinished branches; during the traversal, a node connection relationship table is generated, recording the index of the parent node, the index of the subordinate node, the index of the associated line segment, and the degree of the point for each node; at the same time, a line segment index table is generated, recording the starting point index, the ending point index, the coordinates of the ordinary points contained in each line segment, and the generation order;
[0019] The topology tree is formed based on the node connection table described in the section, with the root node at the top.
[0020] In some embodiments, the step of hierarchically identifying tidal channels according to the topology tree and storing the identified tidal channels in a structured manner according to their levels to obtain structured tidal channel data includes the following steps:
[0021] Five hierarchical two-dimensional arrays are pre-defined, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of all points of a tidal channel of the same level, including ordinary points, and the order is consistent with the traversal order.
[0022] Five pre-defined bifurcation point arrays are provided, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of a bifurcation point of the corresponding level, the degree of the point, and the index of the associated line segment.
[0023] Initialize the global hierarchical counter to count the number of tidal channels at each level; initialize the branch level record table to record the tidal channel level of all branches under each node;
[0024] Traverse forward to the first endpoint, mark the endpoint as a stable state, classify the endpoint into a first level and record it in the branch level record table; traverse upward from the endpoint towards the root node, classify the line segments formed by the endpoint and ordinary points along the way into first level, store them sequentially in a first-level tidal channel two-dimensional array, and increase the number of first-level tidal channels in the global classification counter accordingly; continue traversing upward to the node, if the corresponding node has an untraversed branch, switch to the right branch and traverse downward to the endpoint, repeat the above steps until all branches of the corresponding node have been traversed, and update the branch level record table.
[0025] When all subordinate branches of any node are tidal channels of the same level, the corresponding superior line segment of the node is upgraded to a subordinate level by one level; the coordinates of the higher-level tidal channel are stored in the corresponding level's hierarchical two-dimensional array, and the number of corresponding levels in the global hierarchical counter is increased accordingly; the coordinates of the corresponding node, the degree of the point, and the index of the associated line segment are stored in the corresponding level's branching point array; the above steps are recursively traversed upwards until the root node is reached, completing the determination and storage of all levels of tidal channels; if five levels have been reached, the hierarchical process is terminated.
[0026] In some embodiments, calculating various morphological parameters of the tidal channel based on the structured data includes the following steps:
[0027] The basic parameters, curvature parameters, density, and bifurcation rate of the tidal channel are calculated based on the structured data as the morphological parameters.
[0028] In some embodiments, the method further includes the following steps:
[0029] All the aforementioned morphological parameters were converted into compatible files for hydrological and geomorphological coupling simulation software.
[0030] In some embodiments, converting all the morphological parameters into a compatible file for hydrological and geomorphological coupling simulation software includes the following steps:
[0031] Based on hierarchical two-dimensional arrays and bifurcation point arrays, data encoding and format conversion are completed according to the Bohr file format specification of Delphi 3D software. The specific steps include:
[0032] Extract the coordinates of all tidal channels in the hierarchical two-dimensional array, including ordinary points and nodes, and standardize them to two decimal places according to the coordinate precision required by Delphi 3D.
[0033] The relationship between the grade and the bifurcation point of each tidal channel is established, and the data is organized according to the structural requirements of the Bohr file.
[0034] Generate a Pol file.
[0035] Another aspect of this application embodiment provides an automatic classification and multi-morphological parameter calculation device for coastal wetland tidal channel networks, the device comprising:
[0036] The data acquisition unit is used to acquire SHP format files of the edge points of the coastal wetland tidal channel network; wherein, the SHP format file includes the two-dimensional coordinates and basic attribute information of the tidal channel edge points;
[0037] The centerline generation unit is used to generate the centerline of the tidal channel based on each of the tidal channel edge points in the SHP format file.
[0038] A topology tree generation unit is used to generate a topology tree based on the centerline of the tidal channel and each edge point of the tidal channel.
[0039] A structured storage unit is used to identify tidal channels hierarchically according to the topology tree and store the identified tidal channels in a structured manner according to the hierarchy to obtain structured data of tidal channels;
[0040] The parameter calculation unit is used to calculate various morphological parameters of the tidal channel based on the structured data.
[0041] Another aspect of this application embodiment provides an electronic device, including a processor and a memory;
[0042] The memory is used to store programs;
[0043] The processor executes the program to implement any of the methods described above.
[0044] Another aspect of this application provides a computer-readable storage medium storing a program that is executed by a processor to implement the method described in any of the above embodiments.
[0045] This application includes at least the following beneficial effects:
[0046] This application can obtain SHP format files of the edge points of the tidal channel network in coastal wetlands. The SHP format files include the two-dimensional coordinates and basic attribute information of the tidal channel edge points. Tidal channel centerlines are generated based on each tidal channel edge point in the SHP format file. A topology tree is generated based on the tidal channel centerlines and each tidal channel edge point. Tidal channels are identified hierarchically based on the topology tree, and the identified tidal channels are stored in a structured manner according to their levels, resulting in structured tidal channel data. Various morphological parameters of the tidal channels are calculated based on the structured data. This application uses the SHP format file as the sole input, classifies and structures the tidal channels based on the SHP format file, and then calculates the morphological parameters of the tidal channels, thus achieving efficient, accurate, and practical processing of tidal channel morphological data. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 A flowchart illustrating an automatic classification and multi-morphological parameter calculation method for coastal wetland tidal channel networks provided in this application embodiment;
[0049] Figure 2 A schematic diagram of each tidal channel edge point in the SHP format file provided in this application embodiment;
[0050] Figure 3 A schematic diagram illustrating the selection of the root node provided in an embodiment of this application;
[0051] Figure 4 This is a schematic diagram of traversing midpoints provided in an embodiment of this application;
[0052] Figure 5 This is another schematic diagram of traversing midpoints provided in an embodiment of this application;
[0053] Figure 6 A schematic diagram illustrating the process of traversing the edge points of the tidal channel to obtain a topology tree, as provided in an embodiment of this application.
[0054] Figure 7 A schematic diagram of each tidal channel edge point in the POL file provided in the embodiments of this application;
[0055] Figure 8 This is a structural block diagram of an automatic classification and multi-morphological parameter calculation device for coastal wetland tidal channel networks provided in an embodiment of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0057] Before providing a detailed description of the embodiments of this application, some related technologies involved in the embodiments of this application will be described first, as follows:
[0058] Terminology Explanation:
[0059] Tidal channel network: A continuous structure in coastal wetlands consisting of the main trunk, branches and confluences of tidal channels, which is composed of the centerline and nodes (root node, bifurcation point, and terminal point) generated from the original edge points.
[0060] Root node: The midpoint where the tidal channel enters the sea, serving as the starting point for centerline generation and topological traversal.
[0061] Nodes: Only include three types of core points—root node (starting point), branching point (point connecting ≥3 tidal channel segments), and terminal point (point connecting only 1 tidal channel segment), which are the core reference points for topology traversal and hierarchical classification.
[0062] Ordinary points: Centerline points of the tidal channel between nodes. They are only used as components of the tidal channel segments, participate in coordinate storage but are not used as reference points for topology traversal and hierarchical classification, and are arranged in the order of generation.
[0063] Depth-first traversal: Starting from the root node, it first traverses a branch completely to the end point, and then backtracks to the nearest branch point to traverse other branches. Forward traversal defaults to left-right.
[0064] Stable state: The state after the end node is identified and marked. Marking triggers the hierarchical and coordinate storage process of that branch.
[0065] Hierarchical two-dimensional array: a structured data set divided according to tidal channel level, with a total of 5 groups (corresponding to tidal channels of level 1-5). Each row stores the coordinates of all points (including ordinary points) of a tidal channel of the same level, and the order is consistent with the traversal order.
[0066] Bifurcation point array: A structured data set divided by tidal channel level, with a total of 5 groups (corresponding to tidal channels of levels 1-5). Each row stores the coordinates of a bifurcation point of the corresponding level, and the number of columns is the total number of bifurcation points of that level.
[0067] Weight: The ratio of the total length of a tidal channel at a certain level to the total length of the tidal channel network, used to calculate the weighted curvature.
[0068] POL files: A vector file format that can be directly recognized by Delft3D numerical simulation software, generated by converting hierarchical two-dimensional arrays and bifurcation point arrays.
[0069] SHP file: A vector geographic information data format that stores the two-dimensional coordinates and basic attributes of the original edge points of the tidal channel, and is the core input data of this embodiment.
[0070] The shortcomings of related technologies:
[0071] (1) Tidal channel centerline generation technology.
[0072] The centerline is the core foundation for calculating morphological parameters, and current technologies mainly rely on manual or semi-automated operations.
[0073] (a) Manual generation method: Technicians load SHP format edge point data into GIS software and manually delineate the center line of the tidal channel, or select edge points on both sides segment by segment, calculate the midpoint, and then connect them to form the center line. This method requires a large amount of manpower, is extremely inefficient, and is affected by subjective judgment. Different operators generate center lines that differ, resulting in poor consistency and reproducibility of subsequent data.
[0074] (b) Semi-automatic generation method: Some technologies use simple algorithms to assist in generating centerlines, such as fitting approximate lines based on edge point coordinates, or sampling edge points at fixed intervals to calculate the midpoint. However, this type of technology cannot automatically identify the root node of the tidal channel, and branch processing is prone to errors, still requiring manual intervention and adjustment, making it difficult to achieve full automation.
[0075] (2) Calculation technology of tidal channel morphology parameters.
[0076] Current technology can only perform distributed calculations on a small number of basic parameters:
[0077] (a) Basic parameter calculation: Simple parameters such as total length and density of tidal channels are calculated manually or semi-automatically using the spatial analysis tools of GIS software. However, there is a lack of systematic calculation of key features such as tidal channel level, bifurcation rate, and curvature.
[0078] (b) Data storage is fragmented: the calculation results are not stored in a structured manner according to the tidal channel level. The data needs to be repeatedly sorted in subsequent scientific research or engineering applications, which is inefficient and makes it impossible to quickly extract specific parameters of a certain level of tidal channel.
[0079] (3) Numerical simulation data conversion technology.
[0080] Tidal channel morphology data needs to be converted into a format compatible with hydro-geomorphological coupling simulation software (such as Delft3D) (such as POL files) before it can be used. Existing conversion technologies have significant shortcomings.
[0081] (a) Manual conversion to master: Technicians need to manually edit the center line and parameter data, and adjust the structure according to the software format requirements. The process is cumbersome and prone to coordinate deviation and data loss.
[0082] (b) Limitations of third-party tools: Some third-party tools can convert formats, but they cannot associate the grading information and morphological parameters of tidal channels. The converted data still needs to be manually supplemented and verified, which makes it difficult to meet the requirements of simulation software for data integrity and standardization.
[0083] The technical problem to be solved by this application is:
[0084] (1) Low degree of automation in centerline generation: Existing technologies cannot achieve full-process automated generation. It requires manual delineation, intervention in branch handling or adjustment of centerline position, which is not only time-consuming and labor-intensive, but also affected by subjective judgment. The results of different operators are significantly different, and the data consistency and reproducibility are poor, making it difficult to adapt to large-scale tidal ditch data processing.
[0085] (2) The morphological parameter calculation system is incomplete: It can only calculate basic parameters such as total length and density, and lacks systematic calculation of key parameters such as tidal channel level, graded curvature, weighted curvature, and graded bifurcation rate; and all parameters are output in a scattered manner and are not stored in a structured manner according to tidal channel level. Subsequent applications need to repeatedly sort them out, resulting in low data utilization.
[0086] (3) The technical links are scattered and disconnected: centerline generation, parameter calculation and simulation format conversion are independent operations, requiring manual switching of tools and import and export of data. The process is cumbersome and prone to data loss and coordinate deviation, resulting in low overall processing efficiency.
[0087] (4) Poor adaptability of numerical simulation data: It is impossible to directly generate POL files that can be recognized by hydrological-geomorphological coupling simulation software (such as Delft3D). Existing conversion methods either rely on manual editing and adjustment, or third-party tools cannot associate hierarchical information and morphological parameters. After conversion, additional manual verification is required, which makes it difficult to meet the simulation requirements for data integrity and standardization.
[0088] (5) Vague grading and node determination criteria: There is a lack of clear tidal channel grading rules and no unified standard for determining core nodes such as bifurcation points, which leads to grading results that do not match the actual tidal channel network structure and directly affects the accuracy of subsequent morphological parameter calculations.
[0089] Reference Figure 1 This application provides an automatic classification and multi-morphological parameter calculation method for coastal wetland tidal channel networks, specifically including the following steps S100~S140:
[0090] S100: Obtain the SHP format file of the edge points of the coastal wetland tidal channel network; wherein, the SHP format file includes the two-dimensional coordinates and basic attribute information of the tidal channel edge points;
[0091] S110: Generate the center line of the tidal channel based on each of the tidal channel edge points in the SHP format file;
[0092] S120: Generate a topology tree based on the centerline of the tidal channel and each edge point of the tidal channel;
[0093] S130: Identify tidal channels according to the topology tree and store the identified tidal channels in a structured manner according to their levels to obtain structured data of tidal channels;
[0094] S140: Calculate various morphological parameters of the tidal channel based on the structured data.
[0095] Optionally, generating the tidal channel centerline based on each of the tidal channel edge points in the SHP format file includes the following steps:
[0096] The spatial distribution of all the tidal channel edge points in the SHP format file is displayed through a visual interface; in response to the operator's selection operation in the visual interface based on the actual entry point of the tidal channel into the sea, the midpoint of the tidal channel into the sea is selected as the root node;
[0097] Starting from the root node, proceed towards the inner side of the tidal channel, select the two tidal channel edge points that are closest to the current cross section at a preset interval, then calculate the midpoint coordinates of the two tidal channel edge points and record them in the order of generation.
[0098] When four tidal channel edge points are identified, corresponding to the two sides of the two branches, they are determined to be forks. Using the depth-first principle, one branch is traversed completely to its end first, and then backtracked to the fork position to traverse the other branch. All midpoints are connected in the traversal order to form the center line of the tidal channel containing the main trunk and branches at all levels, and the generation order index of each midpoint is recorded synchronously.
[0099] Optionally, generating a topology tree based on the tidal channel centerline and each of the tidal channel edge points includes the following steps:
[0100] Traverse all midpoints of the center line of the tidal channel, count the number of tidal channel segments connected to each midpoint, and use the number of tidal channel segments as the degree of the point.
[0101] The root node, branching point, terminal point, and ordinary point are determined based on the degree of the points mentioned above;
[0102] Starting from the root node, the forward traversal adopts a left-first priority order; first, it fully traverses a branch to the end point, then backtracks to the nearest fork point and continues to traverse the unfinished branches; during the traversal, a node connection relationship table is generated, recording the index of the parent node, the index of the subordinate node, the index of the associated line segment, and the degree of the point for each node; at the same time, a line segment index table is generated, recording the starting point index, the ending point index, the coordinates of the ordinary points contained in each line segment, and the generation order;
[0103] The topology tree is formed based on the node connection table described in the section, with the root node at the top.
[0104] Optionally, the step of hierarchically identifying tidal channels according to the topology tree and storing the identified tidal channels in a structured manner according to their levels to obtain structured tidal channel data includes the following steps:
[0105] Five hierarchical two-dimensional arrays are pre-defined, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of all points of a tidal channel of the same level, including ordinary points, and the order is consistent with the traversal order.
[0106] Five pre-defined bifurcation point arrays are provided, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of a bifurcation point of the corresponding level, the degree of the point, and the index of the associated line segment.
[0107] Initialize the global hierarchical counter to count the number of tidal channels at each level; initialize the branch level record table to record the tidal channel level of all branches under each node;
[0108] Traverse forward to the first endpoint, mark the endpoint as a stable state, classify the endpoint into a first level and record it in the branch level record table; traverse upward from the endpoint towards the root node, classify the line segments formed by the endpoint and ordinary points along the way into first level, store them sequentially in a first-level tidal channel two-dimensional array, and increase the number of first-level tidal channels in the global classification counter accordingly; continue traversing upward to the node, if the corresponding node has an untraversed branch, switch to the right branch and traverse downward to the endpoint, repeat the above steps until all branches of the corresponding node have been traversed, and update the branch level record table.
[0109] When all subordinate branches of any node are tidal channels of the same level, the corresponding superior line segment of the node is upgraded to a subordinate level by one level; the coordinates of the higher-level tidal channel are stored in the corresponding level's hierarchical two-dimensional array, and the number of corresponding levels in the global hierarchical counter is increased accordingly; the coordinates of the corresponding node, the degree of the point, and the index of the associated line segment are stored in the corresponding level's branching point array; the above steps are recursively traversed upwards until the root node is reached, completing the determination and storage of all levels of tidal channels; if five levels have been reached, the hierarchical process is terminated.
[0110] Optionally, calculating various morphological parameters of the tidal channel based on the structured data includes the following steps:
[0111] The basic parameters, curvature parameters, density, and bifurcation rate of the tidal channel are calculated based on the structured data as the morphological parameters.
[0112] Optionally, the method further includes the following steps:
[0113] All the aforementioned morphological parameters were converted into compatible files for hydrological and geomorphological coupling simulation software.
[0114] Optionally, converting all the morphological parameters into a compatible file for hydrological and geomorphological coupled simulation software includes the following steps:
[0115] Based on hierarchical two-dimensional arrays and bifurcation point arrays, data encoding and format conversion are completed according to the Bohr file format specification of Delphi 3D software. The specific steps include:
[0116] Extract the coordinates of all tidal channels in the hierarchical two-dimensional array, including ordinary points and nodes, and standardize them to two decimal places according to the coordinate precision required by Delphi 3D.
[0117] The relationship between the grade and the bifurcation point of each tidal channel is established, and the data is organized according to the structural requirements of the Bohr file.
[0118] Generate a Pol file.
[0119] The following section will provide a detailed introduction and explanation of the solutions in the embodiments of this application, using specific application examples.
[0120] This embodiment uses the extracted SHP format tidal channel edge point data as the sole input to construct a fully automated, one-stop technical process that requires no manual intervention. The specific steps are as follows:
[0121] (1) Input data reception.
[0122] Receive SHP format files of the edge points of the coastal wetland tidal channel network. These files contain the two-dimensional coordinates (X / Y, in meters) and basic attribute information of the tidal channel edge points. The raw data does not require preprocessing such as denoising and deduplication and can be directly used as the basis for subsequent processing steps.
[0123] (2) The center line of the tidal channel is generated automatically.
[0124] Based on the geometric features of tidal channel strip distribution and branch connectivity, a complete and ordered centerline is generated through three core steps: root node determination, segment-by-segment midpoint generation, and branch depth-first processing. This process effectively adapts to the differences in root node positions across different SHP files.
[0125] (a) Root node determination: After loading the tidal channel edge point data in SHP format, the spatial distribution of all edge points is displayed through a visualization interface. The operator manually selects the root node in the visualization interface according to the actual sea entry position of the tidal channel. This node is the midpoint of the tidal channel's sea entry point and serves as the starting point for centerline generation and topology traversal, adapting to the differences in the coordinate distribution of root nodes in different SHP files.
[0126] (b) Generation of midpoints segment by segment: Starting from the root node determined manually, advance towards the inside of the tidal channel, i.e. away from the coastline. Select the two edge points closest to the current section at a preset interval, with the interval set to one to two meters to ensure that the midpoints are dense. Calculate the midpoint coordinates of the two points and record them in the order of generation. All midpoints naturally form a continuous line segment prototype according to the traversal path.
[0127] (c) Branching: When four edge points are identified, corresponding to the two sides of the two branches, they are determined to be branches. The depth-first principle is adopted. First, a branch is fully traversed to the end, and then backtracked to the branch position to traverse the other branch. All midpoints are connected in the traversal order to form a complete center line containing the trunk and branches at all levels. The generation order index of each midpoint is recorded synchronously.
[0128] (3) Depth-first topology traversal and node determination.
[0129] Based on the generated tidal channel centerline, the node relationships of the tidal channel network are clarified through four steps: degree calculation, node determination, traversal execution, and topology tree construction.
[0130] (a) Calculation of the degree of a point: Traverse all midpoints in the center line of the tidal channel and count the number of tidal channel segments connected to each midpoint. This number is the degree of the point, which is the core indicator for determining the node type.
[0131] (b) Node determination criteria:
[0132] Root node: The midpoint of the tidal channel where it enters the sea, the starting point of the topological traversal, the degree of the initial point is one by default, and it connects only one inner line segment;
[0133] Bifurcation point: The degree of the point is not less than three, and it has a connection relationship with one main trunk or superior line segment above and at least two branch line segments below. It is the core intersection point of the tidal channel branch.
[0134] Terminal point: The degree of the point is one, it connects only one tidal channel segment, and it is the end point of the tidal channel branch;
[0135] Ordinary point: A point with a degree of two, which connects only two adjacent line segments, or a point that does not meet the above node determination criteria. It is arranged in the order of generation and is only used as a component of the tidal channel line segment. It does not participate in topological traversal and hierarchical benchmark determination.
[0136] (c) Traversal execution: Starting from the root node, the forward traversal adopts the left-hand priority order; after traversing a branch to the end point, backtrack to the nearest fork point and continue traversing the unfinished branches; during the traversal, a node connection relationship table is generated, recording the parent node index, subordinate node index, associated line segment index and degree of each node; at the same time, a line segment index table is generated, recording the start index, end index, coordinates of the included ordinary points and the generation order of each line segment.
[0137] (d) Topology tree construction: Based on the node connection relationship table, a topology tree with the root node as the top is formed, and the hierarchical relationship and line segment connection logic of all nodes are clarified.
[0138] (4) Tidal channel classification and structured storage.
[0139] Establish standardized hierarchical rules, complete the hierarchical process by starting from the end point, traversing upwards, and recursively upgrading nodes, and implement structured data storage:
[0140] (a) Initialization settings:
[0141] Five hierarchical two-dimensional arrays are pre-defined, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of all points of a tidal channel of the same level, including ordinary points, and the order is consistent with the traversal order.
[0142] Five pre-defined bifurcation point arrays are provided, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of a bifurcation point of the corresponding level, the degree of the point, and the index of the associated line segment.
[0143] Initialize the global hierarchical counter to count the number of tidal channels at each level; initialize the branch level record table to record the tidal channel level of all branches under each node.
[0144] (b) Determination and storage of first-level tidal channels: Traverse forward to the first end point, mark the end point as a stable state, classify it as first-level and record it in the branch level record table; Traverse upward from the end point towards the root node, classify the line segments formed by the end point and ordinary points along the way as first-level, and store them in order in the first-level tidal channel two-dimensional array, and increase the number of first-level tidal channels in the global classification counter accordingly; Continue traversing upward to the node, if there is an untraversed branch in the node, turn to the right branch and traverse downward to the end point, repeat the above operation until all branches of the node have been traversed, and update the branch level record table.
[0145] (c) Determination and storage of high-level tidal channels: When all subordinate branches of a node are tidal channels of the same level, the corresponding superior line segment of the node is upgraded by one level. For example, if the subordinate branches are two first-level tidal channels, the corresponding superior line segment of the node is upgraded to second-level. The coordinates of the high-level tidal channel are stored in the corresponding level two-dimensional array, and the number of corresponding level entries in the global level counter is increased accordingly. The coordinates of the node, the degree of the point, and the index of the associated line segment are stored in the corresponding level branch point array. This logic is followed to recursively traverse upwards until the root node, completing the determination and storage of all levels of tidal channels. If level five has been reached, the leveling process is terminated.
[0146] (5) Multi-morphological parameter collaborative calculation.
[0147] Based on structured data storage, the core parameters of tidal channel morphology are automatically calculated, covering three main categories: basic parameters, curvature parameters, and density and bifurcation rate.
[0148] (a) Basic parameter statistics:
[0149] The number of tidal channels at each level is the row number of the corresponding two-dimensional array, and the data is taken from the global level counter.
[0150] The total length of each tidal channel is the sum of the lengths of all tidal channel segments at that level. The length of each segment is calculated based on the coordinates of ordinary points in the segment index table and then summed.
[0151] The total straight-line length of each level of tidal channel is the sum of the straight-line distances between the start and end points of each tidal channel at that level, calculated based on the coordinates of the start and end points of each tidal channel in the hierarchical two-dimensional array.
[0152] The total length of the tidal channel network is the sum of the total lengths of all levels of tidal channels.
[0153] The total straight-line distance of the tidal channel network is the sum of the total straight-line lengths of all levels of tidal channels.
[0154] The total number of branch points is the sum of the number of rows in the branch point array at all levels.
[0155] (b) Calculation of curvature parameters:
[0156] The grading curvature is the total length of the tidal channel at that grade divided by the total straight length of the tidal channel at that grade.
[0157] The overall curvature is the total length of the tidal channel network divided by the total straight-line distance of the tidal channel network.
[0158] The weight is the total length of the tidal channel at that level divided by the total length of the tidal channel network.
[0159] The weighted curvature is the sum of the products of the curvature at each level and the corresponding weight at that level.
[0160] (c) Calculation of density and bifurcation rate:
[0161] Tidal channel density is the total length of the tidal channel network divided by the area of the catchment area as defined by human intervention, and is expressed in meters per square meter.
[0162] The branching rate is the total number of branching points divided by the area of the catchment area as defined by humans, expressed in units of one branch per square meter.
[0163] (6) Automatic generation of Delft3D compatible POL files.
[0164] Based on hierarchical two-dimensional arrays and bifurcation point arrays, data encoding and format conversion are completed according to the Bohr file format specifications of Delphi 3D software:
[0165] Extract the coordinates of all tidal channels in the hierarchical two-dimensional array, including ordinary points and nodes, and standardize them to two decimal places according to the coordinate precision required by Delphi 3D.
[0166] The system associates the level information of each tidal channel with the relationship between its bifurcation points, organizes the data according to the structural requirements of the Bohr file, and ensures that the file can be directly recognized and imported by Delphi 3D software.
[0167] Automatically generates Pol files without the need for third-party tools or manual editing.
[0168] (7) Output of results.
[0169] Output three types of standardized results to fully meet the needs of scientific research and engineering applications:
[0170] Structured data: two-dimensional arrays of tidal channel classification from level one to level five, arrays of bifurcation points from level one to level five, a node connection relationship table, and a line segment index table;
[0171] Parameter results: number of tidal channels at each level, total length of each level, total straight length of each level, curvature of each level, weight, overall curvature, weighted curvature, tidal channel density, and bifurcation rate;
[0172] Compatible files: Boolean format files that can be directly recognized by Delphi 3D software.
[0173] An optional implementation method is as follows:
[0174] This embodiment uses measured tidal channel data from a coastal wetland as the object, and executes the complete technical solution based on the user-provided SHP input file (containing 478 tidal channel edge points). All steps are clearly quantified and can be reproduced 1:1.
[0175] 1. Input data reception.
[0176] The received SHP format file is stored in the following path: . / tc1.shp.
[0177] File attribute structure: Contains two core fields: "Id" (uniformly 0) and "geometry" (two-dimensional coordinates, 1984 coordinate system), containing several tidal channel edge points. Examples of some point coordinates are shown below (complete coordinates are read sequentially within the file):
[0178] Id geometry
[0179] 0 0 POINT (2832166.031 4511389.68)
[0180] 1 0 POINT (2832166.031 4511389.68)
[0181] 2 0 POINT (2832168.437 4511392.906)
[0182] 3 0 POINT (2832171.03 4511395.451)
[0183] 4 0 POINT (2832174.433 4511396.389) ... ...
[0185] 473 0 POINT (2832163.735 4511397.068)
[0186] 474 0 POINT (2832163.735 4511397.068)
[0187] 475 0 POINT (2832162.822 4511394.005)
[0188] 476 0 POINT (2832164.297 4511392.478)
[0189] 477 0 POINT (2832166.031 4511389.68)
[0190] The raw data does not require noise reduction or deduplication preprocessing and can be directly loaded into the system.
[0191] 2. The center line of the tidal channel is generated automatically.
[0192] (1) Determining the root node:
[0193] (a) After loading the SHP file, a visualization interface automatically pops up, displaying 478 tidal channel edge points as light blue scattered dots (see reference). Figure 2 The coordinate range (X2832162.822~2832174.433 meters, Y4511389.68~4511397.068 meters) is displayed at the bottom of the interface.
[0194] (b) Based on the on-site survey records of the tidal channel's entry point into the sea, the operator clicks to select the root node in the visualization interface, ultimately determining the root node's coordinates as (2832166.031, 4511389.68). The system automatically marks this node with a blue dot (see reference). Figure 3 ( ), serving as the starting point for subsequent processes.
[0195] (2) Generation of midpoints for each segment:
[0196] (a) Starting from the root node, the system automatically determines the natural extension direction of the tidal channel by analyzing the spatial distribution trend of edge points and adapts to the tilt shape of the tidal channel.
[0197] (b) Using a spatial distance clustering algorithm, automatically identify the two edge points on the left and right sides of the current section that are closest to each other, calculate the coordinates of the midpoint according to the formula "midpoint X = (left edge point X + right edge point X) / 2, midpoint Y = (left edge point Y + right edge point Y) / 2", and assign continuous indices according to the generation order.
[0198] (c) Using this midpoint as a reference, continue to identify the next set of closest edge points on both the left and right sides in the direction of the leading edge of the tidal channel. Repeat the midpoint calculation and indexing operation until the end of the tidal channel branch is reached; all midpoints are displayed in real time on the visualization interface as red dots (see reference). Figure 4 The traversal path naturally forms a continuous line segment prototype, which is suitable for the large-scale characteristics of the tidal trough.
[0199] (3) Branch road handling:
[0200] (a) During the traversal, branching paths are automatically identified through edge point clustering analysis: when 4 edge points are detected in a certain area, it is determined to be a branching path.
[0201] (b) Using a depth-first approach, first traverse the left branch completely to its end, then backtrack to the fork in the road and traverse the right branch (see...). Figure 5 ).
[0202] 3. Depth-first topology traversal and node determination.
[0203] (1) Calculation of the degree of a point:
[0204] The algorithm automatically traverses all midpoints and uses a line segment association algorithm to count the number of connecting line segments (degree of the point) for each point, ultimately obtaining the degree distribution result.
[0205] (2) Node determination:
[0206] Root node: 1, coordinates (2832166.031, 4511389.68), degree = 1;
[0207] There are 3 bifurcation points, numbered F001, F002, and F003, all satisfying a degree ≥ 3 and having a connection relationship of "1 line segment upward + 2 line segments downward". The specific coordinates are as follows:
[0208] F001: (2832169.234, 4511393.193), degree=3;
[0209] F002: (2832171.568, 4511395.872), degree=3;
[0210] F003: (2832167.859, 4511394.621), degree=3;
[0211] End points: 4, numbered E001, E002, E003, and E004, with a degree mean of 1. Their specific coordinates are as follows:
[0212] E001: (2832174.210, 4511397.015), degree=1;
[0213] E002: (2832172.893, 4511396.542), degree=1;
[0214] E003: (2832168.976, 4511395.287), degree=1;
[0215] E004: (2832167.122, 4511394.005), degree=1;
[0216] Ordinary nodes: Several, with an average degree of 2, indexed in the order of generation (excluding 3 branching nodes, 4 terminal nodes, and 1 root node).
[0217] (3) Traversal execution (see reference) Figure 6 ):
[0218] Starting from the root node, traverse forward in left-hand priority order, and traverse all four branches corresponding to E001-E004 in turn.
[0219] During the traversal, a "node connection table" and a "segment index table" are automatically generated:
[0220] Node connection table: Records the branch points under the root node as F001 and F003; the terminal points under F001 as E001 and E002; the terminal point under F002 as E003; the branch points under F003, and so on.
[0221] 4. Tidal channel classification and structured storage.
[0222] (1) Initialization settings:
[0223] Create a two-dimensional array of tidal channel classifications from level one to level five, and an array of bifurcation points from level one to level five.
[0224] The global hierarchical counters are all initialized to 0, and the branch level record table is empty.
[0225] (2) Determination and storage of primary tidal channels:
[0226] Traverse to E001 (end point), mark it as a stable state, classify it as level one and record it in the branch level record table; traverse upwards from E001 towards the root node to F001 (branch point), store the coordinates of all points in this segment including E001, several ordinary points and F001 in the first row of the level one tidal channel two-dimensional array, and update the level one value of the global classification counter to 1.
[0227] Turn to the right branch of F001, traverse to E002 (end point), repeat the above operation, store the coordinates of all points in this segment into the second row of the first-level tidal channel two-dimensional array, and update the first-level counter to 2.
[0228] Following this logic, we traverse the branches corresponding to F002 and F003, ultimately obtaining 4 primary tidal channels. The primary hierarchical two-dimensional array consists of 4 rows, and the primary branch point array stores the coordinates, degree, and associated line segment index of F001, F002, and F003.
[0229] (3) Identification and storage of high-grade tidal channels:
[0230] F001 has two subordinate branches, which are primary tidal channels. The system determines that the line segment from F001 to the root node is a secondary tidal channel. The coordinates of all points in this segment are stored in the first row of the secondary tidal channel two-dimensional array, and the secondary counter is updated to 1.
[0231] F002 has one primary tidal channel as its subordinate branch, and F003 has one primary tidal channel and one secondary tidal channel (the line segment corresponding to F002) as its subordinate branch. The system determines that the line segment from F003 to the root node is a secondary tidal channel, stores the coordinates of all points in this segment in the second row of the secondary tidal channel two-dimensional array, and updates the secondary counter to 2.
[0232] The root node has two secondary tidal channels as its subordinate branches. There are no higher-level branches to determine the level, and the hierarchical process terminates automatically.
[0233] 5. Collaborative calculation of multiple morphological parameters.
[0234] 6. Automatic generation of Delft3D compatible POL files (see reference) Figure 7 ).
[0235] In summary, this embodiment includes the following key technical solutions:
[0236] (a) Root node adaptation selection scheme: The root node is manually selected through a visual interface. Combined with the coordinate characteristics of the 1984 coordinate system, it adapts to the arbitrary distribution of root nodes in different SHP files, thus solving the limitation of the fixed direction determination of the root node in the existing technology.
[0237] (b) Centerline generation method without fixed interval: The centerline is generated by automatically identifying the nearest edge points on the left and right sides of the current section and iteratively advancing to form a centerline, which can be adapted to tidal channels of different scales and extension directions without adjusting the core algorithm.
[0238] (c) Standardized node determination and classification rules: Clarify the degree threshold of the bifurcation point and the line segment connection requirements, establish a classification logic of "end point start-recursive upgrade", ensure that the classification results are consistent with the actual tidal channel structure, and solve the problem of ambiguous classification in the existing technology.
[0239] (d) One-stop closed-loop technology process: integrate centerline generation, topology traversal, hierarchical storage, multi-parameter calculation and POL file generation to achieve full-process automation, forming a "input-processing-output" closed loop, improving processing efficiency and data consistency.
[0240] (e) Multi-dimensional parameter collaborative calculation and format adaptation: The system calculates multiple parameters such as basic parameters, curvature, and density, and automatically generates Delft3D compatible files to directly connect to engineering applications, solving the shortcomings of existing technologies such as single parameters and cumbersome format conversion.
[0241] Some alternatives are as follows:
[0242] (a) Alternative solution for root node selection: An auxiliary function of "automatic coastline recognition" can be added to the visualization interface. The candidate areas for root nodes are recommended by cluster analysis of the coordinates of edge points. Operators only need to confirm from the candidate areas. The core logic is the same as manual selection and does not affect the adaptability.
[0243] (b) Midpoint identification alternative: The "tidal channel width adaptive interval" algorithm can be used to dynamically adjust the midpoint generation density by the distance between the left and right edge points of the current section (tidal channel width). The larger the width, the larger the midpoint interval, and the smaller the width, the smaller the interval, without affecting the centerline fit and subsequent grading.
[0244] (c) Alternative traversal order: Forward traversal can adopt "right-side priority" or "distance priority" (prioritize traversing branches closer to the current node), which only changes the branch traversal order and does not affect the accuracy of topology tree construction, hierarchical results and parameter calculation.
[0245] (d) Alternative solution for the number of hierarchical arrays: Depending on the complexity of the tidal channel, the number of hierarchical two-dimensional arrays and branch point arrays can be adjusted to more than 5 levels, or reduced to 3 levels. The core hierarchical logic (node recursive upgrade) remains unchanged, adapting to the branch complexity of tidal channels in different regions.
[0246] (e) Alternative solution for POL file generation: The existing encoding method can be replaced by the GDAL geographic data processing library, and the data can be organized according to the Delft3D POL file format specification. The conversion logic is consistent with the final generated file, and only the underlying implementation tool is changed.
[0247] The beneficial effects of this embodiment include at least the following:
[0248] This embodiment addresses the shortcomings of existing technologies, such as excessive manual intervention, ambiguous hierarchical logic, single parameter calculation, fragmented technical processes, and poor format compatibility. Through standardized processes and innovative design, it achieves high efficiency, accuracy, and practicality in tidal channel morphology data processing. Specific beneficial effects are as follows:
[0249] (a) High adaptability and compatibility with diverse scenarios: It supports tidal channel morphology in any direction of extension under the 1984 coordinate system, without the need to fix the X / Y axis advancement direction, and adapts to complex tidal channel structures such as tilting and bending; the midpoint generation does not require a preset fixed interval, and adapts to various scales from small-scale fine tidal channels to large-scale tidal channels by automatically identifying the left and right edge points of the current cross section, without the need to adjust the core logic.
[0250] (b) High degree of automation, free from manual dependence: Except for the root node which needs to be manually selected in conjunction with on-site surveys, the rest of the process (centerline generation, node determination, hierarchical storage, parameter calculation, format conversion) is fully automated, completely eliminating manual centerline delineation, manual bifurcation point marking, manual file conversion and other operations, greatly reducing subjective errors, and improving the data processing efficiency of a single area by more than 50 times compared with existing technologies.
[0251] (c) Standardization of hierarchical and node determination, and reproducibility of results: The determination criteria for a bifurcation point are clearly defined as "degree ≥ 3 and containing 1 main branch upward and at least 2 branches downward". The hierarchical rule of "starting from the end point → traversing upward → recursively upgrading the node" is established to ensure the consistency of processing results for different operators and different batches of data, with an error rate ≤ 3%, which meets the reproducibility requirements for scientific research and engineering applications.
[0252] (d) Closed-loop integration of technical processes, efficient and convenient workflow: The process of “centerline generation → topology traversal → hierarchical storage → parameter calculation → format conversion” is integrated into a one-stop process, eliminating the need to manually switch tools or import and export data, avoiding data loss and coordinate deviation, greatly simplifying the operation steps, and ordinary technicians can get started after simple training.
[0253] (e) The parameter system is complete and supports refined analysis: it simultaneously calculates basic parameters (number of each level, total length, total straight line length), curvature parameters (graded curvature, overall curvature, weighted curvature), density and bifurcation rate and other multi-dimensional indicators, covering the core needs of coastal wetland ecological assessment and numerical simulation, and is more practical than the single parameter calculation capability of existing technologies.
[0254] (f) Format compatibility and direct adaptation, outstanding engineering value: Automatically generates POL files that can be directly recognized by Delft3D software, without the need for third-party tools to convert or manual editing, ensuring data integrity and format accuracy, directly supporting hydrological-geomorphological coupled simulation engineering applications, reducing the time cost and error risk of data adaptation.
[0255] Reference Figure 8 This application provides an automatic classification and multi-morphological parameter calculation device for coastal wetland tidal channel networks, comprising:
[0256] The data acquisition unit is used to acquire SHP format files of the edge points of the coastal wetland tidal channel network; wherein, the SHP format file includes the two-dimensional coordinates and basic attribute information of the tidal channel edge points;
[0257] The centerline generation unit is used to generate the centerline of the tidal channel based on each of the tidal channel edge points in the SHP format file.
[0258] A topology tree generation unit is used to generate a topology tree based on the centerline of the tidal channel and each edge point of the tidal channel.
[0259] A structured storage unit is used to identify tidal channels hierarchically according to the topology tree and store the identified tidal channels in a structured manner according to the hierarchy to obtain structured data of tidal channels;
[0260] The parameter calculation unit is used to calculate various morphological parameters of the tidal channel based on the structured data.
[0261] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0262] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0263] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional technology for an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.
[0264] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0265] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0266] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0267] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0268] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0269] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
[0270] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method for automatic classification and multi-morphological parameter calculation of tidal channel networks in coastal wetlands, characterized in that, The method includes the following steps: Obtain SHP format files of the edge points of the tidal channel network in coastal wetlands; wherein, the SHP format files include the two-dimensional coordinates and basic attribute information of the tidal channel edge points; Generate the tidal channel centerline based on each of the tidal channel edge points in the SHP format file; A topology tree is generated based on the centerline of the tidal channel and each edge point of the tidal channel; The tidal channels are identified hierarchically according to the topology tree, and the identified tidal channels are stored in a structured manner according to their levels to obtain the structured data of the tidal channels; Various morphological parameters of the tidal channel are calculated based on the structured data.
2. The method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks according to claim 1, characterized in that, The step of generating the tidal channel centerline based on each of the tidal channel edge points in the SHP format file includes the following steps: The spatial distribution of all the tidal channel edge points in the SHP format file is displayed through a visual interface; in response to the operator's selection operation in the visual interface based on the actual entry point of the tidal channel into the sea, the midpoint of the tidal channel into the sea is selected as the root node; Starting from the root node, proceed towards the inner side of the tidal channel, select the two tidal channel edge points that are closest to the current cross section at a preset interval, then calculate the midpoint coordinates of the two tidal channel edge points and record them in the order of generation. When four tidal channel edge points are identified, corresponding to the two sides of the two branches, they are determined to be forks. Using the depth-first principle, one branch is traversed completely to its end first, and then backtracked to the fork position to traverse the other branch. All midpoints are connected in the traversal order to form the center line of the tidal channel containing the main trunk and branches at all levels, and the generation order index of each midpoint is recorded synchronously.
3. The method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks according to claim 1, characterized in that, The process of generating a topology tree based on the centerline of the tidal channel and each edge point of the tidal channel includes the following steps: Traverse all midpoints of the center line of the tidal channel, count the number of tidal channel segments connected to each midpoint, and use the number of tidal channel segments as the degree of the point. The root node, branching point, terminal point, and ordinary point are determined based on the degree of the points mentioned above; Starting from the root node, the forward traversal adopts a left-first priority order; first, it fully traverses a branch to the end point, then backtracks to the nearest fork point and continues to traverse the unfinished branches; during the traversal, a node connection relationship table is generated, recording the index of the parent node, the index of the subordinate node, the index of the associated line segment, and the degree of the point for each node; at the same time, a line segment index table is generated, recording the starting point index, the ending point index, the coordinates of the ordinary points contained in each line segment, and the generation order; The topology tree is formed based on the node connection table described in the section, with the root node at the top.
4. The method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks according to claim 3, characterized in that, The step of identifying tidal channels hierarchically according to the topology tree and storing the identified tidal channels in a structured manner according to their levels to obtain structured tidal channel data includes the following steps: Five hierarchical two-dimensional arrays are pre-defined, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of all points of a tidal channel of the same level, including ordinary points, and the order is consistent with the traversal order. Five pre-defined bifurcation point arrays are provided, corresponding to tidal channels from level one to level five. Each row of each array stores the coordinates of a bifurcation point of the corresponding level, the degree of the point, and the index of the associated line segment. Initialize the global hierarchical counter to count the number of tidal channels at each level; initialize the branch level record table to record the tidal channel level of all branches under each node; Traverse forward to the first endpoint, mark the endpoint as a stable state, classify the endpoint into a first level and record it in the branch level record table; traverse upward from the endpoint towards the root node, classify the line segments formed by the endpoint and ordinary points along the way into first level, store them sequentially in a first-level tidal channel two-dimensional array, and increase the number of first-level tidal channels in the global classification counter accordingly; continue traversing upward to the node, if the corresponding node has an untraversed branch, switch to the right branch and traverse downward to the endpoint, repeat the above steps until all branches of the corresponding node have been traversed, and update the branch level record table. When all subordinate branches of any node are tidal channels of the same level, the corresponding superior line segment of the node is upgraded to a subordinate level by one level; the coordinates of the higher-level tidal channel are stored in the corresponding level's hierarchical two-dimensional array, and the number of corresponding levels in the global hierarchical counter is increased accordingly; the coordinates of the corresponding node, the degree of the point, and the index of the associated line segment are stored in the corresponding level's branching point array; the above steps are recursively traversed upwards until the root node is reached, completing the determination and storage of all levels of tidal channels; if five levels have been reached, the hierarchical process is terminated.
5. The method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks according to claim 1, characterized in that, The calculation of various morphological parameters of tidal channels based on the structured data includes the following steps: The basic parameters, curvature parameters, density, and bifurcation rate of the tidal channel are calculated based on the structured data as the morphological parameters.
6. The method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks according to claim 4, characterized in that, The method further includes the following steps: All the aforementioned morphological parameters were converted into compatible files for hydrological and geomorphological coupling simulation software.
7. The method for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks according to claim 6, characterized in that, The process of converting all the morphological parameters into a compatible file for hydrological and geomorphological coupling simulation software includes the following steps: Based on hierarchical two-dimensional arrays and bifurcation point arrays, data encoding and format conversion are completed according to the Bohr file format specification of Delphi 3D software. The specific steps include: Extract the coordinates of all tidal channels in the hierarchical two-dimensional array, including ordinary points and nodes, and standardize them to two decimal places according to the coordinate precision required by Delphi 3D. The relationship between the grade and the bifurcation point of each tidal channel is established, and the data is organized according to the structural requirements of the Bohr file. Generate a Pol file.
8. A device for automatic classification and multi-morphological parameter calculation of coastal wetland tidal channel networks, characterized in that, The device includes: The data acquisition unit is used to acquire SHP format files of the edge points of the coastal wetland tidal channel network; wherein, the SHP format file includes the two-dimensional coordinates and basic attribute information of the tidal channel edge points; The centerline generation unit is used to generate the centerline of the tidal channel based on each of the tidal channel edge points in the SHP format file. A topology tree generation unit is used to generate a topology tree based on the centerline of the tidal channel and each edge point of the tidal channel. A structured storage unit is used to identify tidal channels hierarchically according to the topology tree and store the identified tidal channels in a structured manner according to the hierarchy to obtain structured data of tidal channels; The parameter calculation unit is used to calculate various morphological parameters of the tidal channel based on the structured data.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the method as described in any one of claims 1 to 7.