An automated nested partitioning method for coastal watersheds considering islands
Through the automated nesting division method, Pfafstetter encoding and R-tree indexing technology, the problem of difficult island basins is solved, and efficient division of island basins is achieved, cost reduction and efficiency improvement.
Patent Information
- Application Number
- CN202410564582.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-05-09
AI Technical Summary
When the existing technology divides nested basins at global or continental scales, it is difficult to automatically process island basins, resulting in the need of manual intervention, low efficiency and high data production costs.
An automated nested division method is adopted to extract the mainland part of the coastal basin based on the digital elevation model, and the Pfafstetter encoding method is used for preliminary division. Islands with large areas are preferred, and islands with uncoded islands are merged to encoded basins. Islands are optimized through R-tree index The merger process ensures that the island set is divided into secondary basins with balanced area and reasonable spatial distribution.
It realizes automated nesting division of island basins, reduces data production costs, improves the efficiency and reproducibility of nesting division of coastal basins, and overcomes the difficulties that traditional methods require manual processing.
Smart Images

Figure CN118468554B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of watershed division, and in particular to an automatic nested division method of coastal watersheds taking islands into consideration. Background Art
[0002] A river basin refers to a river catchment area surrounded by a watershed. It is a self-contained hydrological unit from the source to the estuary. Each river has its own basin. A large basin can be divided into several sub-basins according to the level of the water system, and the sub-basins can be divided into smaller sub-basins to form nested basins. The global or continental-scale nested basin dataset is an important basic data for geographical national surveys and basin management.
[0003] When performing nested basin delineation at the global or continental scale, the number of basins involved is large, while the number of basin codes is limited during nested delineation. Therefore, the concept of basin needs to be expanded, and the catchment area of a single river, islands, and their collections are all coded as basins. Coastal basins can generally be divided into continental and island parts. When the coastal basins are further subdivided, multiple islands can form an island collection and be coded as a whole. At present, the nested delineation of island basins is usually performed manually or semi-automatically, which is not conducive to the production of data sets and leads to great limitations on practicality. Summary of the invention
[0004] In view of the problems in the related art, the present invention proposes an automatic nested division method of coastal watersheds taking islands into consideration to overcome the above-mentioned technical problems existing in the existing related art.
[0005] To this end, the specific technical solution adopted by the present invention is as follows:
[0006] An automated nested partitioning method for coastal watersheds considering islands, the automated nested partitioning method for coastal watersheds considering islands comprising the following steps:
[0007] S1, extracting the continental part of the coastal basin based on the digital elevation model;
[0008] S2. Use the outflow basin division method in the Pfafstetter coding method to preliminarily divide the continental part of the coastal basin. If the number of divided sub-basins is less than 10, select qualified islands for supplementary coding, and then merge the remaining uncoded islands into the coded basin (at this time, the coded basin types may exist as continental basins, coastal basins and islands);
[0009] S3. When performing secondary division of the coded island set, large islands are preferentially regarded as continental basins for division. If there are no large islands, they are coded from large to small according to their area, and finally the uncoded islands are merged into the coded basins;
[0010] S4. Compare the areas of all islands in the encoded island set with a preset threshold, and analyze whether to continue the secondary division based on the comparison result.
[0011] Preferably, extracting the continental part of the coastal basin based on the digital elevation model comprises the following steps:
[0012] S11, using the DEM data as terrain input data, traversing each grid cell in the terrain input data, and identifying the grid cells where the ocean exists;
[0013] S12, marking grid cells with ocean as coastline grids, and performing four-connected domain marking processing on the binary image of the coastline grid to identify the coastline of the continent and the coastline of each island;
[0014] S13. Based on the identified continental coastline and the coastline of each island, identify the continental portion of the islands and coastal watersheds.
[0015] Preferably, step S2 specifically includes the following steps:
[0016] S21. Use the outflow basin division method in the Pfafstetter coding method to preliminarily divide the continental part of the coastal basin;
[0017] S22, comparing the number of the sub-basin division results with a preset value (generally 10), if the sub-basin division result is less than the preset value, calculating the area of all islands included in the current level basin;
[0018] S23, sorting the islands that meet the preset conditions (the proportion of island area to the total area of the watershed exceeds a certain threshold, such as 5%) in descending order to generate an island sorting list;
[0019] S24, preferentially selecting islands with large areas from the island sorting list for supplementary coding until the number of secondary watersheds reaches a preset value;
[0020] S25. Merge the remaining uncoded islands into the coded watershed with the shortest distance.
[0021] Preferably, the preliminary division of the continental part of the coastal basin using the outflow basin division method in the Pfafstetter coding method comprises the following steps:
[0022] S211. According to the natural direction of water flow, trace back from the river mouth to the source of the river. When the rivers meet, the river with a large basin is regarded as the main stream, and the river with a small basin is regarded as the tributary.
[0023] S212, record the locations of all tributaries, select the tributary with the largest catchment area from the tributary locations, and encode the tributary basins in order according to the distance from the tributary with the largest catchment area to the river mouth;
[0024] S213. Divide the original basin into several intermediate basins through tributary basins, and code the intermediate basins in turn according to the distance from the intermediate basin to the estuary, so as to complete the division of the secondary basin.
[0025] Preferably, the secondary watershed includes attributes such as watershed code, watershed type, area, number of islands, longitude and latitude of the outlet, and longitude and latitude of the outlet of the upstream watershed.
[0026] Preferably, merging the remaining uncoded islands into the coded watershed with the shortest distance comprises the following steps:
[0027] S251, taking the watershed pixels with non-watershed pixels in the neighborhood grid as watershed edge points, and looping through the watershed pixels to extract the edge points of the encoded watershed to establish an R-tree spatial index;
[0028] S252, calculating the center point of the outer rectangle of the island to be merged, and extracting the edge points of the encoded watershed in the R-tree in sequence according to the R-tree spatial index;
[0029] S253, calculating the shortest distance Dst from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed, and clarifying the distance relationship between the island to be merged and the coded watershed;
[0030] S254, when there is no edge point of the coded watershed in the outer rectangle of the island to be merged, the outer rectangle of the island to be merged is expanded to the surroundings by a distance Dst to form a new rectangle, and the edge points of the coded watershed within the new rectangle are determined;
[0031] S255. If the new rectangular range contains only one edge point of the coded watershed, the island to be merged is directly merged into the coded watershed; if the new rectangular range includes several edge points of the coded watersheds, the R-tree index is used to calculate the shortest distance from the island to be merged to the coded watershed, and the watershed with the shortest distance is selected for merging.
[0032] Preferably, when performing secondary division on the coded island set, large islands are preferentially regarded as continental basins for division. If there are no large islands, the islands are coded from large to small according to their area. Finally, the uncoded islands are merged into the coded basin, which includes the following steps:
[0033] S31. When the coded island set is further divided into sub-basins, if the proportion of the largest island in the total area of the set exceeds a certain threshold (such as 70%), the island is divided and coded into sub-basins in the same way as the continent in the Pfafstetter method.
[0034] S32. If the number of divisions of the secondary watershed is less than 10, sort the island areas from large to small to generate an island sorting list, select the islands with larger areas (the proportion of the total area of the watershed set exceeds a certain threshold, such as 5%) and perform supplementary coding in order from large to small until the number of codes reaches 10;
[0035] S33, merging the remaining uncoded islands in the island sorting list into the coded watershed with the shortest distance;
[0036] S34. If there are no large islands with an area ratio greater than the specified threshold in an island set, when making secondary divisions, first calculate the areas of all islands contained in the current level of the basin, and sort the islands by area from large to small; encode islands with larger areas (the proportion of island area to the total area of the basin set exceeds a certain threshold, such as 5%) separately, and the code number is in the range of 0 to 8 (the code number does not exceed 9); calculate the distances from all uncoded islands in the current level of the basin to the coded islands, and select the islands with a distance from the coded islands greater than a certain threshold (such as 1 / 4 of the diagonal length of the outer rectangle of the island set), the largest average distance, and the largest area for supplementary coding, and iterate this process until the code number reaches 10; the remaining uncoded islands are merged into the nearest coded basin.
[0037] Preferably, comparing the areas of all islands in the encoded island set with a preset threshold, and analyzing whether to continue the secondary division according to the comparison result comprises the following steps:
[0038] S41. If the area of all islands in the island set is smaller than a certain threshold (e.g. 30km 2 ), no further subdivision is performed;
[0039] S42. If there are islands in the island set whose area is larger than a certain threshold, the secondary watershed division will continue.
[0040] Preferably, the calculation formula for the center point of the outer rectangle of the island to be merged is:
[0041] X Mid =Round((X Max +X Min ) / 2);
[0042] Y Mid =Round((Y Max +Y Min) / 2);
[0043] In the formula, X Mid and Y Mid Respectively represent the horizontal and vertical coordinates of the center point of the outer rectangle of the island to be merged;
[0044] X Max and Y Max Respectively represent the maximum value of the horizontal coordinate and the maximum value of the vertical coordinate of the enclosing rectangle;
[0045] X Min and Y Min They represent the minimum value of the horizontal coordinate and the minimum value of the vertical coordinate of the enclosing rectangle respectively.
[0046] Preferably, the calculation formula for the shortest distance from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed is:
[0047]
[0048] D st Indicates the shortest distance from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed;
[0049] X Mid The horizontal coordinate of the center point of the rectangle surrounding the island to be merged;
[0050] Xext represents the horizontal coordinate of the edge point of the encoded watershed;
[0051] YMid represents the ordinate of the center point of the outer rectangle of the island to be merged;
[0052] Yext represents the ordinate of the edge point of the encoded watershed.
[0053] The beneficial effects of the present invention are as follows: when further dividing the island part, the present invention designs an algorithm according to the two principles of priority coding of islands with large areas and priority coding of islands that are relatively independent in space, so that the island set can be divided into secondary watersheds with relatively balanced areas and taking into account spatial distribution, which solves the defect that traditional methods cannot automatically process island watersheds and require additional manual processing, thereby realizing the automatic nested division of island watersheds, overcoming the difficulty that traditional methods require manual processing, reducing data production costs, and improving the efficiency and reproducibility of nested division of coastal watersheds. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 is a flow chart of a method for automatic nested partitioning of coastal watersheds considering islands according to an embodiment of the present invention;
[0056] Figure 2 is a specific implementation flow chart of a method for automatic nested division of coastal watersheds considering islands according to an embodiment of the present invention;
[0057] Figure 3 is a schematic diagram of a decomposition process of an island set including large islands in an automated nested partitioning method of a coastal watershed considering islands according to an embodiment of the present invention;
[0058] Figure 4 is a schematic diagram of an island set decomposition process excluding large islands in an automated nested partitioning method for coastal watersheds considering islands according to an embodiment of the present invention;
[0059] Figure 5 This is a schematic diagram of the watershed division results in the Arctic region in an automatic nested division method of coastal watersheds taking islands into consideration according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.
[0061] According to an embodiment of the present invention, a method for automated nested division of coastal watersheds taking islands into consideration is provided. In the implementation process, Python is used as the programming language, SQLite is used as the database, and the GDAL library is used to read and write data. The data MERIT Hydro used in this example is a set of high-precision global hydrological datasets (download address: http: / / hydro.iis.u-tokyo.ac.jp / ~yamadai / MERIT_Hydro / ), which includes hydrologically corrected elevation data (Digital Elevation Model, DEM), D8 flow direction data, and corresponding runoff accumulation data, which can be directly applied to watershed division. This dataset introduces relevant algorithms during the production process to distinguish between virtual depressions and real depressions, and the extracted river network is extremely close to the real river network observed by satellite, so it is selected as the basic terrain data for constructing a multi-scale nested watershed dataset in the present invention.
[0062] It should be noted that the specific implementation scheme of the method for automatic nested division of coastal watersheds taking islands into consideration provided by the present invention includes: using the Pfafstetter method to divide the continental part of the coastal watershed. If the number of divided secondary watersheds is less than 10, select islands with larger areas for supplementary coding; use the way of processing the continent in the Pfafstetter method to further divide the large islands in the island set; according to the principle of "large area and relatively independent islands in space are given priority coding", further divide the island set that does not include large islands. If the areas of all islands in a certain island set are less than a certain threshold, stop the secondary division.
[0063] The present invention improves the traditional Pfafstetter coding method and realizes the automatic nested watershed division taking islands into consideration, thus overcoming the difficult problem that the traditional method requires manual coding of islands, and improving the efficiency and reproducibility of the nested division of coastal watersheds. It has broad application prospects in the fields of national geographic survey and watershed management.
[0064] It should be noted that the principle of the present invention is that the coastal basin in the present invention includes a continental part and an island part. When the area of the island part is equal to or larger than that of the continental part, the island part needs to be further divided. When the island part is further divided, the algorithm is designed according to the two principles of giving priority to coding islands with large areas and giving priority to coding islands that are relatively independent in space, so that the island set can be divided into secondary basins with relatively balanced areas and taking into account spatial distribution.
[0065] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1-Figure 2 As shown, according to an automatic nested division method of coastal watersheds considering islands according to an embodiment of the present invention, the automatic nested division method of coastal watersheds considering islands comprises the following steps:
[0066] S1. Extract the continental part of the coastal basin based on the digital elevation model.
[0067] Among them, extracting the continental part of the coastal basin based on the digital elevation model includes the following steps:
[0068] S11, using the DEM data as terrain input data, traversing each grid cell in the terrain input data, and identifying the grid cells where the ocean exists;
[0069] S12, marking grid cells with ocean as coastline grids, and performing four-connected domain marking processing on the binary image of the coastline grid to identify the coastline of the continent and the coastline of each island;
[0070] S13. Based on the identified continental coastline and the coastline of each island, identify the continental portion of the islands and coastal watersheds.
[0071] S2. Use the outflow basin division method in the Pfafstetter coding method to preliminarily divide the continental part of the coastal basin. If the number of divided secondary basins is less than 10, select eligible islands for additional coding, and then merge the remaining uncoded islands into the coded basin (at this time, the coded basin types may include continental basins, coastal basins and island collections).
[0072] Among them, the outflow basin division method in the Pfafstetter coding method is used to preliminarily divide the continental part of the coastal basin. If the number of divided secondary basins is less than 10, eligible islands are selected for supplementary coding, and the remaining uncoded islands are merged into the coded basin, which includes the following steps:
[0073] S21, using the outflow basin division method in the Pfafstetter coding method to preliminarily divide the continental part of the coastal basin. Step S21 specifically includes the following steps:
[0074] S211. According to the natural direction of water flow, trace back from the river mouth to the source of the river. When the rivers meet, the river with a large basin is regarded as the main stream, and the river with a small basin is regarded as the tributary.
[0075] S212, record the locations of all tributaries, select the tributary with the largest catchment area from the tributary locations, and encode the tributary basins in order according to the distance from the tributary with the largest catchment area to the river mouth;
[0076] S213. Divide the original basin into several intermediate basins through tributary basins, and code the intermediate basins in turn according to the distance from the intermediate basin to the estuary, so as to complete the division of the secondary basin.
[0077] Among them, the secondary basin includes attributes such as basin code, basin type, area, number of islands, longitude and latitude of the outlet, and longitude and latitude of the upstream basin outlet.
[0078] It should be noted that the Pfafstetter method is used to divide the continental part of the coastal basin. If the number of sub-basins is less than 10, the area of all islands contained in the current level basin is calculated, and the qualified islands (the proportion of island area to the total area of the basin set exceeds a certain threshold, such as 5%) are sorted from large to small according to area, and islands with larger areas are preferentially selected to supplement the number of sub-basins until the number of sub-basins reaches 10; the remaining uncoded islands are merged into the nearest coded basin.
[0079] It should be noted that Pfafstetter coding makes full use of the characteristics of the base 10 digital system. Each division decomposes the upper basin into 9 smaller sub-basins, which are coded with numbers 1 to 9. The size of the number reflects the distance of the sub-basin from the outlet of the upper basin (the number increases from downstream to upstream); the odd or even number reflects the relative position of the sub-basin in the river network structure of the upper basin (even numbers represent tributary basins, and odd numbers represent mainstream basins).
[0080] It should be noted that the Pfafstetter method is used to divide the continental part of the coastal basin, and the results of the sub-basin division mainly include:
[0081] Trace back from the river mouth to the river source. When you encounter a river intersection, take the upstream area (each grid will have an upstream area value, and the upstream area size is determined according to the upstream area value) with a larger area as the main stream, and the smaller area as the tributary. Record the location of the tributary and then continue to trace upstream along the main stream;
[0082] If you encounter a river confluence again, repeat the previous step until you trace back to the source of the river and select the four tributaries with the largest catchment areas from all the recorded tributaries;
[0083] The basins corresponding to the four tributaries with the largest catchment areas are coded as 2, 4, 6, and 8 in the order from near to far from the estuary. At this time, the original basin is divided into five intermediate basins by the above four tributary basins.
[0084] The five intermediate basins are also coded as 1, 3, 5, 7, and 9 in order from near to far from the estuary, thus completing the division of the secondary basins.
[0085] S22, comparing the number of the sub-basin division results with a preset value (generally 10), if the sub-basin division result is less than the preset value, calculating the area of all islands included in the current level basin;
[0086] S23, sorting the islands that meet the preset conditions (the proportion of island area to the total area of the watershed exceeds a certain threshold, such as 5%) in descending order to generate an island sorting list;
[0087] S24, preferentially selecting islands with large areas from the island sorting list for supplementary coding until the number of secondary watersheds reaches a preset value;
[0088] S25. Merge the remaining uncoded islands into the coded watershed with the shortest distance.
[0089] The steps of merging the remaining uncoded islands into the coded watershed with the shortest distance include:
[0090] S251. The watershed pixels with non-watershed pixels in the neighborhood grid (the neighborhood grid refers to "the eight grid cells adjacent to the judged grid cell", all of which belong to the grid type, but are not the same grid) are taken as watershed edge points, and the watershed pixels are traversed in a loop to extract the edge points of the encoded watershed and establish an R-tree spatial index.
[0091] It should be noted that the R-tree is a data structure used for spatial indexing. Each node of the R-tree represents a rectangular area, including a minimum bounding rectangle (MBR), which completely contains the rectangle of all data under the node. The root node of the tree represents the entire space, while the leaf nodes store the actual data. It can effectively process large-scale multidimensional data, provide fast query performance, and support dynamic data insertion and deletion operations.
[0092] S252. Calculate the center point of the outer rectangle of the island to be merged, and extract the edge points of the encoded watershed in the R-tree in sequence according to the R-tree spatial index.
[0093] The calculation formula for the center point of the outer rectangle of the island to be merged is:
[0094] X Mid =Round((X Max +X Min ) / 2);
[0095] Y Mid =Round((Y Max +Y Min ) / 2);
[0096] In the formula, X Mid and Y Mid Respectively represent the horizontal and vertical coordinates of the center point of the outer rectangle of the island to be merged;
[0097] X Max and Y Max Respectively represent the maximum value of the horizontal coordinate and the maximum value of the vertical coordinate of the enclosing rectangle;
[0098] X Min and Y Min They represent the minimum value of the horizontal coordinate and the minimum value of the vertical coordinate of the enclosing rectangle respectively.
[0099] S253, calculating the shortest distance Dst from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed, and clarifying the distance relationship between the island to be merged and the coded watershed.
[0100] The calculation formula for the shortest distance from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed is:
[0101]
[0102] D st Indicates the shortest distance from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed;
[0103] X Mid The horizontal coordinate of the center point of the rectangle surrounding the island to be merged;
[0104] X ext The horizontal coordinates of the edge points of the encoded watershed;
[0105] Y Mid The vertical coordinate of the center point of the rectangle surrounding the island to be merged;
[0106] Y ext The vertical coordinate of the edge point representing the encoded watershed.
[0107] S254. When there is no edge point of the coded watershed within the outer rectangle of the island to be merged, the outer rectangle of the island to be merged is expanded in all directions by a distance Dst to form a new matrix, and the edge points of the coded watershed within the new rectangular range are determined.
[0108] It should be noted that the island outer rectangle is expanded to the surrounding Dst distance to form a new rectangle, and then with the help of the R-tree spatial index, the leaf nodes storing the encoded watershed edge points in the R-tree are taken out one by one, and the X Min <X ext <X Max &&Y Min <Y ext <Y Max Determine the coded watershed edge points within the new rectangle.
[0109] S255. If the new rectangular range contains only one edge point of the coded watershed, the island to be merged is directly merged into the coded watershed; if the new rectangular range includes several edge points of the coded watersheds, the R-tree index is used to calculate the shortest distance Dst from the island to be merged to the coded watershed, and the watershed with the shortest distance is selected for merging.
[0110] It should be noted that the method provided in the present invention for merging uncoded islands into the nearest coded watershed is consistent with step S25.
[0111] S3. When performing secondary division on the coded island set, large islands are preferentially considered as continental basins for division. If there are no large islands, they are coded from large to small according to their area, and finally the uncoded islands are merged into the coded basin.
[0112] When the coded island set is divided into secondary levels, large islands are preferentially regarded as continental basins for division. If there are no large islands, the islands are coded from large to small according to their area. Finally, the uncoded islands are merged into the coded basins, which includes the following steps:
[0113] S31. When the coded island set is further divided into sub-basins, if the proportion of the largest island in the total area of the set exceeds a certain threshold (such as 70%), the island is divided and coded into sub-basins in the same way as the continent in the Pfafstetter method.
[0114] S32. If the number of divisions of the secondary watershed is less than 10, sort the island areas from large to small to generate an island sorting list, select the islands with larger areas (the proportion of the total area of the watershed set exceeds a certain threshold, such as 5%) and perform supplementary coding in order from large to small until the number of codes reaches 10;
[0115] S33. Merge the remaining uncoded islands in the island sorting list into the coded watershed with the shortest distance.
[0116] It should be noted that when the coded island set is further divided into secondary parts, if the proportion of the largest island in the total area of the set exceeds a certain threshold (such as 70%), the island is divided and coded into secondary watersheds using the method of processing the continent in the Pfafstetter method (same as step S2); if the number of secondary watershed divisions is less than 10, islands with larger areas (accounting for a proportion of the total area of the watershed set exceeding a certain threshold, such as 5%) are selected and supplemented in order from large to small until the number of codes reaches 10; the remaining uncoded islands are merged into the nearest coded watershed (the one with the shortest distance to the uncoded island).
[0117] It should be noted that if there are no large islands with an area greater than the specified threshold in an island set, the area of all islands contained in the current level of the basin is calculated first in the secondary division process, and the islands are sorted from large to small according to the area. First, the islands with larger areas (the proportion of island area to the total area of the basin set exceeds a certain threshold, such as 5%) are individually coded, and the number of codes is in the range of 0 to 8 (the number of codes does not exceed 9); the distance from all uncoded islands in the current level of the basin to the coded islands is calculated, and the islands with a distance greater than a certain threshold (such as 1 / 4 of the diagonal length of the outer rectangle of the island set) and the largest average distance and area are selected for supplementary coding, and this process is iterated until the number of codes reaches 10; the remaining uncoded islands are merged into the nearest coded basin. If the area of all islands in a certain island set is less than a certain threshold (such as 30km 2 ), no further subdivision is performed.
[0118] It should be noted that the methods for dealing with continents using the Pfafstetter method mainly include:
[0119] Starting from due north, follow a clockwise direction to find all rivers that flow into the sea;
[0120] Select the four rivers with the largest drainage areas that flow into the sea, and code them as 2, 4, 6, and 8 in the order from near to far from the north (clockwise);
[0121] The remaining continental outflow area is divided into five coastal basin sets by the above four individual basins. These five coastal basin sets are also coded as 1, 3, 5, 7, and 9 in clockwise order; 4) The largest inland basin on the continental scale can be individually coded as basin 0;
[0122] Merge the remaining inland watersheds and islands to the nearest coded watershed.
[0123] S4. Compare the areas of all islands in the encoded island set with a preset threshold, and analyze whether to continue the secondary division based on the comparison result.
[0124] The steps of comparing the areas of all islands in the encoded island set with a preset threshold and analyzing whether to continue the secondary division according to the comparison result include the following steps:
[0125] S41. If the area of all islands in the island set is smaller than a certain threshold (e.g. 30km 2 ), no further subdivision is performed;
[0126] S42. If there are islands in the island set whose area is larger than a certain threshold, the secondary watershed division will continue.
[0127] The following takes the Arctic region as an example to further illustrate the embodiments of the present invention:
[0128] (1) The Arctic region, a region with a large number of islands, was selected as the study area. This region contains a variety of basin types, such as coastal basins and island clusters, which can better reflect the practicality and advantages of this method;
[0129] (2) Using DEM data as input data, we traverse each grid cell in the terrain data, identify the grid cells with oceans in the 8-neighborhood, and mark them as coastline grids. Subsequently, we perform four-connected domain labeling on the binary image of the coastline grid to identify the continental coastline and the coastline of each island, thereby obtaining the islands and the continental part of the coastal basin in the study area.
[0130] (3) The Pfafstetter method is used to further divide the continental part of the coastal basin and check whether the number of sub-basins reaches 10. If the number of sub-basins is less than 10, select islands with larger areas (the proportion of the total area of the basin set exceeds a certain threshold, such as 5%) and add codes in descending order until the number of codes reaches 10; the remaining uncoded islands are merged into the nearest coded basin, and then the sub-basin information obtained by division (including basin code, basin type, area, number of islands, outlet longitude and latitude, and outlet longitude and latitude of the upstream basin) is stored in the basin attribute database.
[0131] (4) When the coded island set is further divided into sub-levels, if the proportion of the largest island in the total area of the set exceeds a certain threshold (such as 70%), the method of dealing with the continent in the Pfafstetter method is adopted (for example, Figure 3 If the number of sub-basins is less than 10, select the islands with larger areas (the proportion of the total area of the basin set exceeds a certain threshold, such as 5%) and perform supplementary coding in descending order until the number of codes reaches 10; the remaining uncoded islands are merged into the nearest coded basin.
[0132] (5) If there are no large islands with an area greater than the specified threshold in an island set, Figure 4 The content shown is divided into secondary levels. First, the islands with larger areas (defined as above) are individually coded from large to small, and the number of codes does not exceed 9. Then, the distances from the remaining islands with larger areas to the coded islands are calculated, and the islands with a distance to the coded islands greater than a certain threshold (such as 1 / 4 of the diagonal length of the outer rectangle of the island set) and the largest average distance are selected for supplementary coding, and this process is iterated until the number of codes reaches 10. The remaining uncoded islands are merged into the nearest coded basin.
[0133] (6) If the area of all islands in a certain island set is smaller than a certain threshold (e.g. 30 km 2 ), no further subdivision is performed.
[0134] It should be noted that the effect of island basin nesting division is as follows Figure 5 As shown by Figure 5It can be seen that: the islands in the Arctic region are divided to obtain four levels of basin boundaries. As the level increases, the basin density also increases; and the islands that are not adjacent to the Arctic continent are correspondingly refined, and the smaller islands are merged into the corresponding basins according to the rules. Compared with the existing methods, the present invention can be applied to areas with a large number of islands. The islands can be automatically considered for nested basin division to obtain multiple levels of inland basin boundaries, ensuring that each basin has a unique code, and has broad application prospects in geographic national conditions surveys and basin management.
[0135] To sum up, with the help of the above-mentioned technical scheme of the present invention, when further dividing the island part, the present invention designs an algorithm according to the two principles of priority coding of islands with large areas and priority coding of islands that are relatively independent in space, so that the island set can be divided into secondary watersheds with relatively balanced areas and spatial distribution. The defect that the traditional method cannot automatically process island watersheds and requires additional manual processing is solved, and the automatic nested division of island watersheds is realized, which overcomes the problem that the traditional method requires manual processing, reduces the data production cost, and improves the efficiency and reproducibility of the nested division of coastal watersheds.
[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for automatic nested partitioning of coastal watersheds considering islands, characterized in that: The automated nested partitioning method for coastal watersheds considering islands includes the following steps: S1, extracting the continental part of the coastal basin based on the digital elevation model; S2. Use the outflow basin division method in the Pfafstetter coding method to preliminarily divide the continental part of the coastal basin. If the number of divided secondary basins is less than 10, select qualified islands for supplementary coding, and then merge the remaining uncoded islands into the coded basins. The types of the coded basins include continental basins, coastal basins and island collections; S3. When performing secondary division of the coded island set, large islands are preferentially regarded as continental basins for division. If there are no large islands, they are coded from large to small according to their area, and finally the uncoded islands are merged into the coded basins; S4, comparing the areas of all islands in the encoded island set with a preset threshold, and analyzing whether to continue the secondary division based on the comparison result; The extraction of the continental part of the coastal basin based on the digital elevation model comprises the following steps: S11, using the DEM data as terrain input data, traversing each grid cell in the terrain input data, and identifying the grid cells where the ocean exists; S12, marking grid cells with ocean as coastline grids, and performing four-connected domain marking processing on the binary image of the coastline grid to identify the coastline of the continent and the coastline of each island; S13. Based on the identified continental coastline and the coastline of each island, identify the mainland portion of the islands and coastal watersheds; The step of merging the remaining uncoded islands into the coded watershed with the shortest distance comprises the following steps: S251, taking the watershed pixels with non-watershed pixels in the neighborhood grid as watershed edge points, and looping through the watershed pixels to extract the edge points of the encoded watershed to establish an R-tree spatial index; S252, calculating the center point of the outer rectangle of the island to be merged, and extracting the edge points of the encoded watershed in the R-tree in sequence according to the R-tree spatial index; S253, calculating the shortest distance Dst from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed, and clarifying the distance relationship between the island to be merged and the coded watershed; S254: When there are no edge points of the coded watershed within the outer rectangle of the island to be merged, the outer rectangle of the island to be merged is expanded to the surrounding area. st The distance forms a new rectangle and determines the edge points of the encoded watershed within the new rectangle; S255. If the new rectangular range contains only one edge point of the coded watershed, the island to be merged is directly merged into the coded watershed; if the new rectangular range includes several edge points of the coded watersheds, the R-tree index is used to calculate the shortest distance from the island to be merged to the coded watershed, and the watershed with the shortest distance is selected for merging.
2. The method for automatic nested partitioning of coastal watersheds considering islands according to claim 1, characterized in that: The step S2 specifically includes the following steps: S21. Use the outflow basin division method in the Pfafstetter coding method to divide the continental part of the coastal basin; S22, comparing the number of the division results of the secondary watershed with a preset value, if the division result of the secondary watershed is less than the preset value, calculating the area of all islands included in the current level watershed; S23, sorting the islands that meet the preset conditions in order from large to small, and generating an island sorting list; S24, preferentially selecting islands with large areas from the island sorting list for supplementary coding until the number of secondary watersheds reaches a preset value; S25. Merge the remaining uncoded islands into the coded watershed with the shortest distance.
3. The method for automatic nested partitioning of coastal watersheds considering islands according to claim 2, characterized in that: The method of using the outflow basin division method in the Pfafstetter coding method to preliminarily divide the continental part of the coastal basin includes the following steps: S211. According to the natural direction of water flow, trace back from the river mouth to the source of the river. When the rivers meet, the river with a large basin is regarded as the main stream, and the river with a small basin is regarded as the tributary. S212, record the locations of all tributaries, select the tributary with the largest catchment area from the tributary locations, and encode the tributary basins in order according to the distance from the tributary with the largest catchment area to the river mouth; S213. Divide the original basin into several intermediate basins through tributary basins, and code the intermediate basins in turn according to the distance from the intermediate basin to the estuary, so as to complete the division of the secondary basin.
4. The method for automatic nested partitioning of coastal watersheds considering islands according to claim 3, characterized in that: The secondary watershed includes the watershed code, watershed type, area, number of islands, longitude and latitude of the outlet, and longitude and latitude of the upstream watershed outlet.
5. The method for automatic nested partitioning of coastal watersheds considering islands according to claim 4, characterized in that: When performing secondary division on the coded island set, large islands are preferentially regarded as continental basins for division. If there are no large islands, the islands are coded from large to small according to their area. Finally, the uncoded islands are merged into the coded basins, which includes the following steps: S31. When the coded island set is further divided into sub-areas, if the proportion of the largest island in the total area of the set exceeds the preset threshold, the island is divided and coded into sub-areas in the same way as the continent in the Pfafstetter method. S32, if the number of divisions of the secondary watershed is less than 10, sort the island areas from large to small to generate an island sorting list, select the islands that meet the conditions and perform supplementary coding in order from large to small until the number of codes reaches 10; S33, merging the remaining uncoded islands in the island sorting list into the coded watershed with the shortest distance; S34. If there are no large islands with an area greater than the preset threshold in an island set, when making secondary divisions, first calculate the areas of all islands contained in the current level of the basin, and sort the islands by area from large to small; encode the islands within the preset threshold separately, with the code number ranging from 0 to 8, and calculate the distances from all uncoded islands in the current level of the basin to the coded islands, select the islands with a distance greater than the preset threshold, the largest average distance, and the largest area to supplement the encoding, and iterate this process until the code number reaches 10; the remaining uncoded islands are merged into the nearest coded basin.
6. The method for automatic nested partitioning of coastal watersheds considering islands according to claim 5, characterized in that: The step of comparing the areas of all islands in the encoded island set with a preset threshold and analyzing whether to continue the secondary division according to the comparison result comprises the following steps: S41, if the areas of all islands in the island set are smaller than the preset threshold, no secondary division is performed; S42: If there are islands in the island set whose area is larger than the preset threshold, the secondary watershed division is continued.
7. The method for automatic nested partitioning of coastal watersheds considering islands according to claim 6, characterized in that: The calculation formula for the center point of the outer rectangle of the island to be merged is: XMid=Round( ( XMax+XMin ) / 2); YMid=Round( ( YMax+YMin ) / 2); Where XMid and YMid represent the horizontal and vertical coordinates of the center point of the outer rectangle of the island to be merged, respectively; XMax and YMax represent the maximum value of the horizontal coordinate and the maximum value of the vertical coordinate of the enclosing rectangle respectively; XMin and YMin represent the minimum value of the horizontal coordinate and the minimum value of the vertical coordinate of the outer rectangle respectively.
8. The method for automatic nested partitioning of coastal watersheds considering islands according to claim 7, characterized in that: The calculation formula for the shortest distance from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed is: Dst represents the shortest distance from the center point of the outer rectangle of the island to be merged to the edge point of the coded watershed; XMid represents the horizontal coordinate of the center point of the outer rectangle of the island to be merged; Xext represents the horizontal coordinate of the edge point of the encoded watershed; YMid represents the ordinate of the center point of the outer rectangle of the island to be merged; Yext represents the ordinate of the edge point of the encoded watershed.
Citation Information
Patent Citations
Fast coding method for a large quantity of sub-basins on basis of digital river network
CN108804804A
A DEM-based automatic sorting and coding method for continental rivers entering seas
CN109190216A
