1. Load basic data
The river data is a single-line water system. SHP, and the boundary data is a region. SHP, as shown in:
2. Identify river data using regional data
With the preceding operations, the river is cut by region and a new layer (river_identity) is generated. Each river contains the attributes of the region layer. (Note: The clip tool cannot be used here, even if the area layer is selected, the effect cannot be achieved .)
3. Calculate the total length of rivers in each region
(1) OpenRiver_identity layer Attribute Table. The length field is used to calculate the river length.
(2) Right-click the length field → calculate geometry → length. (Note: The River layer must be in the projection coordinate system)
(3) The river length in each region is summarized. Toolbox: analysis tools →Statistics →Summary Statistics
4. Attribute Table connection
The preceding operation generates a new Attribute Table river_sum.dbf, which contains the total length of rivers in each region.Next, you only need to join the river_sum.dbf that contains the total length of the rivers in each region to the choropleth layer. SHP.