Automatic method of dividing small watershed based on DEM data and model builder
Through an automated method based on DEM data and model builder, the serial function of ArcGIS software and model builder is used to achieve efficient and accurate watershed delineation, solving the problems of inefficiency and human factor interference of traditional methods, and providing a basis for watershed research. Provides reliable basic data support.
Patent Information
- Application Number
- CN202410772253.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-17
AI Technical Summary
The traditional watershed division method relies on the experience of professionals, is inefficient, is susceptible to interference from human factors, and is difficult to respond quickly to changes in watershed management needs. It lacks efficient and accurate automation methods.
An automated method of dividing small watersheds based on DEM data and model builder is used. ArcGIS software is used for filling processing, flow direction calculation, and flow calculation. The raster calculator tool is used to generate river network data, and is implemented through river links and catchment area calculations. Watershed area division, combined with the serial function of the model builder, enables automated analysis processes.
It significantly improves the efficiency and accuracy of watershed delineation, reduces interference from human factors, provides reliable basic data for watershed research and water resources management, has high versatility, and is suitable for watershed delineation in other similar areas.
Smart Images

Figure CN118350227B
Abstract
Description
Technical Field
[0001] The invention relates to a method for automatically dividing a watershed surface by utilizing remote sensing data, and belongs to the technical field of data processing and remote sensing. Background Art
[0002] The watershed is an important unit of the surface water cycle and is of great significance for water resources management, water disaster prevention and control, and ecological and environmental protection. The division of the watershed surface is the basic work of watershed research. It can help us better understand the hydrological process, geomorphological characteristics, and ecological and environmental conditions in the watershed. Especially in the study of digital twin watersheds, the watershed surface plays a vital role as the basic data in the data base. However, the traditional watershed surface division method mainly relies on a single hydrological analysis to define the watershed range by the direction of water flow and hydrological characteristics. However, this method is highly dependent on the experience and skills of professionals to interpret and analyze hydrological data, so it is easily interfered by human factors, making the division results inaccurate and unreliable. In addition, the traditional watershed surface division method is time-consuming, labor-intensive, inefficient, and difficult to quickly respond to changes in watershed management needs. These problems limit the effectiveness and applicability of traditional methods in practical applications, and there is an urgent need to seek more efficient and accurate automated watershed surface division methods.
[0003] With the rapid development of remote sensing technology and geographic information system (GIS) technology, it has gradually become a reality to closely combine the two and realize the automatic division of watershed surfaces. As the core data form in GIS, digital elevation model (DEM) provides solid data support for watershed surface division with its ability to accurately depict the undulations of the surface. With the help of DEM data, key information such as elevation, slope, and aspect of the surface can be efficiently extracted, which is conducive to in-depth analysis of the direction and convergence area of surface water flow, and is expected to achieve accurate and automatic division of watershed surfaces. Patent CN 102915227 A discloses a parallel method for watershed extraction from large-scale DEM data. Although it proposes data division, fusion strategy and technical process of parallel computing of watershed extraction in data parallel mode, the process is relatively complex and requires certain basic programming knowledge, and mainly focuses on solving parallel computing problems. Patent CN 112163322 A provides a method for automatic division and coding of calculation units of a one-dimensional model of a river network area. The method uses the DEM data of the basin to obtain river network information. According to the river network information, the method divides the main and tributary rivers and encodes them to improve the efficiency of automatic division and coding of calculation units of the one-dimensional model of the river network area. However, there are many interferences from human factors. Summary of the invention
[0004] The purpose of the present invention is to overcome the above-mentioned shortcomings and provide a method for automatically dividing small watersheds based on DEM data and a model builder. This method can significantly improve the efficiency and accuracy of watershed surface division, reduce the interference of human factors, and provide more reliable basic data support for watershed research and water resources management.
[0005] The technical solution adopted by the present invention is:
[0006] The method for automatically dividing small watersheds based on DEM data and model builder includes the following steps:
[0007] S1. Obtain DEM data and preprocess it;
[0008] S2. Using the hydrological analysis function in ArcGIS software, DEM data is processed for depression filling, flow direction calculation, and flow calculation;
[0009] S3. Use the raster calculator tool to perform map algebra operations on the flow results, set a minimum flow threshold, generate raster-type river network data for raster cells with a flow rate greater than the threshold, and vectorize the river network data;
[0010] S4. Perform river linking operations first according to flow direction data and grid river network data, then perform river network classification operations, and divide the river network levels according to the relationship between main and tributary rivers;
[0011] S5. Use the river link tool to determine the unique intersection of each river network, input the river link result and the calculated flow direction result into the watershed tool to calculate the watershed area, obtain the watershed surface divided into raster type, perform the raster-to-polygon operation on it, and convert the raster type watershed surface into a vector type watershed surface;
[0012] S6. Use the concatenation function of the model builder to arrange the input and output parameters of different geoprocessing tools in a logical order, connect them linearly, and run them after verification, so as to automate the entire analysis process;
[0013] S7. Overlay the vectorized river network results and the vectorized watershed surface results in the layer, and analyze and judge the accuracy and reliability of the watershed surface division by combining the river network direction and river network classification results.
[0014] In the above method, the depression filling in step S2 is to use the built-in function of ArcGIS software to find and fill the depressions and protrusions in the elevation data surface grid, and remove small defects in the data; the flow direction calculation is based on the DEM data after the depression is filled and combined with the D8 single flow direction algorithm to determine the river direction; the flow calculation represents the grid accumulation of the river calculated based on the flow direction result.
[0015] The river network vectorization in step S3 generates a vector type river network based on the flow direction result and the raster river network result.
[0016] In step S4, the river network classification is to divide the river network into different levels according to the relationship between the main and tributary rivers. The Strahler method is used to classify the river network. A river without tributaries is classified as level 1. The classification of rivers with the same level will be increased by 1 level after the confluence of rivers. After the confluence of rivers of different levels, the high level before the confluence is maintained.
[0017] The river link in step S5 refers to a river section connecting two adjacent intersections, connecting a intersection and an outlet, or connecting a intersection and a watershed.
[0018] In step S6, the model builder is used to create a model. The DEM data of the study area is added to the model. Then the "Fill" tool is dragged into the model, and "Connect" is selected to connect the two. The input data is DEM data, and the output data is "Fill". Then the "Flow Direction" tool is dragged into the model and connected with the "Fill" result. According to the above connection form, the "Flow", "Raster Calculator", "River Link", "Catchment Area", and "Raster to Surface" tools are connected in sequence according to the different input and output parameters; then the "Raster River Network Vectorization" and "River Network Classification" tools are dragged into the model in sequence, and the input parameters are the result "direct" generated by "Flow Direction" and the result "River Network" generated by "Raster Calculator" respectively, until the model is established. Select the Verify the entire model tool to check whether there are any errors in the model building process. Finally, click Run the entire model, wait for the results to be generated, and view the output results generated by all processes in the file save folder.
[0019] Model Builder is a unique visual programming language in ArcGIS software, which is used to build geographic processing workflows, and can automatically execute and record spatial analysis and data management processes. It allows users to build complex spatial analysis processes in a graphical way to achieve automated data processing and analysis. The present invention uses the model builder to connect a series of processes and geographic processing tools for watershed surface division, and use the output of one process as the input of another process. By setting parameters and conditions, the automated division and batch processing of watershed surfaces can be achieved.
[0020] Based on DEM data and model builder tools, this paper explores a method for automatically dividing watershed surfaces. This method can significantly improve the efficiency and accuracy of watershed surface division, reduce the interference of human factors, and provide more reliable basic data support for watershed research and water resources management. At the same time, this method is also highly versatile and can be easily applied to watershed surface division work in other similar areas, providing strong technical support for digital management of watersheds. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A model flow diagram of the method of the present invention;
[0022] Figure 2 DEM data of the study area of the embodiment of the present invention;
[0023] Figure 3 This is the vector river network result of the embodiment of the present invention;
[0024] Figure 4 The principle of river network classification based on the Strahler method;
[0025] Figure 5 The river network classification result of the embodiment of the present invention;
[0026] Figure 6 This is the result of watershed surface division according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The present invention is further described below with reference to specific embodiments.
[0028] The method for automatically dividing small watersheds based on DEM data and a model builder comprises the following steps:
[0029] S1. Obtain DEM data and preprocess:
[0030] Download SRTM 30-meter resolution DEM (digital elevation model) data from the Geospatial Cloud Platform (https: / / www.gscloud.cn / ) and preprocess the downloaded DEM data, including data mosaicking and data clipping. The specific steps are:
[0031] Select data resources in the geospatial cloud platform, open public data, query the required SRTM 30-meter resolution DEM data, and select the DEM data within the study area for download (such as Figure 2 ). Import the downloaded DEM data into ENVI software, use the Seamless Mosaic tool to mosaic the data, and then use Subset Data from ROIsParameters to crop the DEM data.
[0032] S2. Using the hydrological analysis function in ArcGIS software, DEM data is processed for depression filling, flow direction calculation, and flow calculation:
[0033] (1) Depression filling is to use the built-in functions of ArcGIS software to find and fill depressions and ridges in the elevation data surface grid and remove small defects in the data so that the river flow direction can be calculated smoothly later. The built-in functions for depression filling are as follows:
[0034] Fill_sa (in_surface_raster, {z_limit}, out_surface_raster)
[0035] Among them, Fill_sa() represents the depression filling function; in_surface_raster is the input raster data, which is the DEM data of the study area here; z_limit is the maximum elevation difference of the filled depression point, which is optional; out_surface_raster is the output data after the depression filling operation.
[0036] The specific operations are as follows: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the hydrological analysis module, select the fill tool, input the surface raster data as DEM data, and output the surface raster data as the DEM data after filling, named "Fill".
[0037] (2) The river flow direction is determined based on the DEM data after filling and combined with the D8 single flow direction algorithm. The built-in function of the flow direction module is:
[0038] FlowDirection_sa(in_surface_raster,{flow_direction_type},out_flow_direction_raster)
[0039] Among them, FlowDirection_sa() represents the flow direction function; in_surface_raster is the input raster data, which is the DEM data after filling in this case; flow_direction_type is the flow direction type, which is the D8 single flow direction method here; out_flow_direction_raster is the output data after the flow direction operation.
[0040] The specific operations are as follows: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the hydrological analysis module, select the flow direction tool, input the surface raster data as "Fill", and output the surface raster data as the data after flow direction calculation, named "direct", and select the DB method for flow direction type.
[0041] (3) River flow refers to the raster accumulation of the river calculated based on the flow direction results. The built-in function of the flow module is:
[0042] FlowAccumulation_sa(in_flow_direction_raster,{data_type},out_accumulation_raster)
[0043] Among them, FlowAccumulation_sa() represents the flow function; in_flow_direction_raster is the flow direction result data; data_type is the output data type, FLOAT (single-precision floating point type) is selected here; out_accumulation_raster is the output data after the flow operation.
[0044] The specific operations are: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the hydrological analysis module, select the flow tool, input the surface raster data as "direct", and output the surface raster data as the data after flow calculation, named "Flow", and the output data type is "FLOAT".
[0045] S3. Use the raster calculator tool to perform map algebra operations on the flow results and set a minimum flow threshold. Generate raster-type river network data for raster cells with a flow rate greater than the threshold and vectorize the river network data (such as Figure 3 ):
[0046] The raster calculator is a module for performing map algebra operations. It is a tool specifically used in model builders. The raster calculator operation can be used to obtain raster river network results. The expression for map algebra operations is:
[0047] Con("%out_accumulation_raster%"> K,1),
[0048] Among them, Con() is the function of map expression, and the result is raster type river network data; out_accumulation_raster is the output data after flow operation; K represents the minimum flow value, which affects the size of subsequent watershed surface division. The larger the K value, the larger the minimum watershed surface area, and the smaller the K value, the smaller the minimum watershed surface area. It is set to 1000 here.
[0049] The specific operations are: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the map algebra module, select the raster calculator tool, enter "Con("%Flow%">1000,1)" in the map algebra expression column, and the output surface raster data is the data calculated by the raster calculator, named "River Network".
[0050] River network vectorization generates a vector type of river network based on the flow direction results and the raster river network results, which serves as the basis for verifying the accuracy of the basin surface division. The built-in functions of the raster river network vectorization module are:
[0051] StreamToFeature_sa(in_stream_raster,in_flow_direction_raster,out_polyline_features) ,
[0052] Among them, StreamToFeature_sa() represents the raster river network vectorization function; in_stream_raster is the input raster data, which is raster type river network data here; in_flow_direction_raste is the flow direction result data; out_polyline_features is the output data after raster river network vectorization, which is vector river network data here.
[0053] The specific operations are: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the hydrological analysis module, select the raster river network vectorization tool, input the river raster data as "river network", input the flow direction raster data as "direct", output the polyline feature as vector type river network data, and name it "Vector River Network".
[0054] S4. Perform river linking operations first based on flow direction data and grid river network data, then perform river network classification operations, and divide the river network levels based on the relationship between main and tributary rivers:
[0055] A river link is a river segment that connects two adjacent junctions, a junction and an outlet, or a junction and a watershed. The built-in functions of the river link module are:
[0056] StreamLink_sa (in_stream_raster, in_flow_direction_raster, out_raster),
[0057] Among them, StreamLink_sa() represents the river link function; in_stream_raster is the input raster data, which is the river network data of raster type here; in_flow_direction_raste is the flow direction result data; out_raster is the river link result.
[0058] The specific operations are: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the hydrological analysis module, select the river link tool, input the river raster data as "river network", input the flow direction raster data as "direct", and output the raster as the river link result, named "River Link Result".
[0059] River network classification is to classify river networks into different levels according to the relationship between the main and tributary rivers. The Strahler method is used for river network classification. A river without tributaries is classified as level 1. The classification of rivers with the same level will be increased by 1 level after the confluence of rivers. After the confluence of rivers with different levels, the high level before the confluence will be maintained. The classification principle is shown in Figure 4 The built-in functions for river network classification are:
[0060] StreamOrder_sa(in_stream_raster,in_flow_direction_raster,{order_method},out_raster)
[0061] Among them, StreamOrder_sa() represents the river network classification function; in_stream_raster is the input raster data, which is the raster type river network data here; in_flow_direction_raste is the flow direction result data; order_method is the river network classification method, which uses the Strahler method here; out_raster is the river network classification output result, see Figure 5 .
[0062] The specific operations are: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the hydrological analysis module, select the river network classification tool, input the river raster data as "river network", input the flow direction raster data as "direct", and output the raster as the river network classification result, named "River Network Classification Result", and select "STRAHLER" as the river network classification method.
[0063] S5. Use the river link tool to determine the unique intersection of each river network, input the river link result and the calculated flow direction result into the watershed tool for watershed calculation, and obtain the watershed surface divided into raster type. Perform the raster-to-polygon operation on it to convert the raster type watershed surface into a vector type watershed surface (see Figure 6 ):
[0064] The catchment area refers to the catchment area formed by the convergence of rivers due to the height and flow direction of the river. It is also expressed as the basin area formed by the convergence of rivers according to the flow direction and the relationship between the main and tributary rivers. The built-in functions of the catchment area module are:
[0065] Watershed_sa (in_flow_direction_raster,in_pour_point_data, out_raster),
[0066] Among them, Watershed_sa() represents the watershed function; in_flow_direction_raste is the flow direction result data; in_pour_point_data is the river link result; out_raster is the watershed output result.
[0067] The specific operations are: open the ArcToolbox toolbox in ArcGIS, find the Spatial Analyst tool, open the hydrological analysis module, select the watershed tool, input the flow direction raster data as "direct", input the raster data or feature slope point data as "river link result", and output the raster as the watershed surface division result, named "watershed surface".
[0068] S6. Use the concatenation function of the model builder to arrange the input and output parameters of different geoprocessing tools in a logical order, connect them linearly, and run them after verification to automate the entire analysis process:
[0069] Model Builder is an application used to create, edit, and manage models. It can string together a series of geoprocessing tools to realize the function of automatically running multiple geoprocessing tools in succession. The input and output parameters of different geoprocessing tools are arranged in a logical order, connected linearly, and run after verification. The data of multiple modules are automatically processed to finally generate a series of result data.
[0070] The specific operation is as follows: find the folder where the file is saved in ArcGIS, right-click and select "New Toolbox", right-click the toolbox, and select "New Model". Add the DEM data of the study area to the model, then drag the "Fill" tool to the model, select "Connect", connect the two, input data as DEM data, output data as "Fill", then drag the "Flow Direction" tool to the model, and connect it with the "Fill" result. According to the above connection form, connect the "Flow", "Raster Calculator", "River Link", "Catchment Area", and "Raster to Surface" tools in turn according to the different input and output parameters; then drag the "Raster River Network Vectorization" and "River Network Classification" tools to the model in turn, and input parameters are the result "direct" generated by "Flow Direction" and the result "River Network" generated by "Raster Calculator" until the model is established. Select the Verify the entire model tool to check whether there are any errors in the model building process, and finally click Run the entire model, wait for the results to be generated, and view the output results generated by all processes in the file save folder.
[0071] At this point, the model is built and when it is needed again, you only need to update the relevant information of the input file and specify the save path of the output file to realize the automatic division of the watershed surface of the DEM data of any study area. This process does not require tedious manual operations, which greatly improves work efficiency.
[0072] S7. Overlay the vectorized river network results and the vectorized watershed surface results in the layer, and analyze and judge the accuracy and reliability of the watershed surface division by combining the river network direction and river network classification results:
[0073] Superimpose the vectorized river network results and the vectorized watershed surface results in the layer, combine the river network direction and the river network classification results, observe the superimposed layer, and carefully analyze whether the direction of the river network matches the boundary of the watershed surface. In theory, each tributary should be surrounded by a separate watershed surface, and the boundary of the watershed surface should naturally extend along the direction of the tributary. If a tributary crosses the boundary of the watershed surface or there is a tributary-free area inside the watershed surface, it may indicate that there is a problem with the watershed surface division, and the parameters for map algebra operations in the raster calculator tool need to be adjusted. Therefore, by superimposing the vectorized river network results and the vectorized watershed surface results, and combining the river network direction and the river network classification results for analysis, the accuracy and reliability of the watershed surface division can be effectively evaluated.
[0074] The above is a detailed introduction of the present invention in combination with specific embodiments, and the protection scope of the present invention is not limited thereto.
Claims
1. The method of automatic sub-basin delineation based on DEM data and model builder is characterized by: The steps include: S1. Obtain DEM data and preprocess it; S2. Using the hydrological analysis function in ArcGIS software, DEM data is processed for depression filling, flow direction calculation, and flow calculation; S3. Use the raster calculator tool to perform map algebra operations on the flow results, set a minimum flow threshold, generate raster-type river network data for raster cells with a flow rate greater than the threshold, and vectorize the river network data; S4. Perform river linking operations first according to flow direction data and grid river network data, then perform river network classification operations, and divide the river network levels according to the relationship between main and tributary rivers; S5. Use the river link tool to determine the unique intersection of each river network, input the river link result and the calculated flow direction result into the watershed tool to calculate the watershed area, obtain the watershed surface divided into raster type, perform the raster-to-polygon operation on it, and convert the raster type watershed surface into a vector type watershed surface; S6. Use the concatenation function of the model builder to arrange the input and output parameters of different geoprocessing tools in a logical order, connect them linearly, and run them after verification, so as to automate the entire analysis process; S7. Overlay the vectorized river network results and the vectorized watershed surface results in the layer, and analyze and judge the accuracy and reliability of the watershed surface division by combining the river network direction and river network classification results.
2. The method for automatically dividing small watersheds based on DEM data and model builder according to claim 1 is characterized in that: In step S2, the depression filling is to use the built-in functions of ArcGIS software to find and fill the depressions and protrusions in the elevation data surface grid, and remove small defects in the data; the flow direction calculation is based on the DEM data after depression filling and combined with the D8 single flow direction algorithm to determine the river direction; the flow calculation represents the grid accumulation of the river calculated based on the flow direction result.
3. The method for automatically dividing small watersheds based on DEM data and model builder according to claim 1 is characterized in that: The river network vectorization in step S3 generates a vector type river network based on the flow direction result and the raster river network result.
4. The method for automatically dividing small watersheds based on DEM data and model builder according to claim 1 is characterized in that: Step S4 The middle river network classification is to divide the river network into different levels according to the relationship between the main and tributary rivers. The Strahler method is used for river network classification. Rivers without tributaries are classified as level 1. The classification of rivers with the same level will be increased by 1 level after the confluence of rivers. After the confluence of rivers of different levels, the high level before the confluence will be maintained.
5. The method for automatically dividing small watersheds based on DEM data and model builder according to claim 1 is characterized in that: The river link in step S5 refers to a river section connecting two adjacent intersections, connecting a intersection and an outlet, or connecting a intersection and a watershed.
6. The method for automatically dividing small watersheds based on DEM data and model builder according to claim 1 is characterized in that: In step S6, the model builder is used to create a model, and the DEM data of the study area is added to the model. Then, the "Fill" tool is dragged into the model, and "Connect" is selected to connect the two. The input data is DEM data, and the output data is "Fill". Then, the "Flow Direction" tool is dragged into the model and connected to the "Fill" result. According to the above connection form, the "Flow", "Raster Calculator", "River Link", "Catchment Area", and "Raster to Surface" tools are connected in sequence according to the different input and output parameters; then, the "Raster River Network Vectorization" and "River Network Classification" tools are dragged into the model in sequence, and the input parameters are the result "direct" generated by "Flow Direction" and the result "River Network" generated by "Raster Calculator" respectively, until the model is completed.
