## 2 Data and Methods
### Methods
#### 2.2.2 Investigation of Habitat Quality  
The habitat quality tool of the InVEST method was adopted. This tool can effectively estimate the magnitude of habitat degradation at a fine scale, thereby enabling the calculation of habitat quality levels [52; 53]:  
\[Q_{xy}=H_{j}\times\left[1-\left(\frac{D_{xy}^{2}}{D_{xy}^{2}+k^{2}}\right)\right] \tag{3}\]  
where \(Q_{xy}\) is the habitat quality in grid \(x\) within land use class \(j\), \(H_{j}\) is the habitat resilience for land use class \(j\), \(k\) is a fixed parameter typically set to 0.5, and \(D_{xy}\) is the habitat degradation level in grid \(x\) within land use class \(j\):  
\[D_{xy}=\sum_{r=1}^{R}\sum_{y=1}^{Y_{r}}\left(\frac{W_{r}}{\sum_{r=1}^{R}W_{r} }\right)r_{y}i_{rxy}\beta_{x}S_{jr} \tag{4}\]  
where \(R\) is the number of threat factors, \(y\) represents a grid in threat factor \(r\), \(Y_{r}\) is the number of grids in that factor, \(W_{r}\) is the weight for threat factor \(r\), \(r_{y}\) is the value of factor \(r\) in grid \(y\), \(i_{rxy}\) is the threat degree of \(r_{y}\) to grid \(x\), \(\beta_{x}\) is the accessibility to grid \(x\), and \(S_{jr}\) is the susceptibility of land use \(j\) to threat factor \(r\), where \(i_{rxy}\) is assessed using the linear or exponential decay formula:  
\[i_{rxy}=1-\left(d_{xy}/d_{r\text{ max}}\right)\ \text{(linear)} \tag{5}\]  
\[i_{rxy}=\exp\left[-(2.99/d_{r\text{ max}})\cdot d_{xy}\right]\ \text{(exponential)} \tag{6}\]  
where \(d_{xy}\) means the straight-line distance from grid \(x\) to grid \(y\), \(d_{r\text{ max}}\) means the maximum threat range for factor \(r\). The extensive use of chemical fertilizers and pesticides on cropland has become a significant threat to surrounding habitat quality in China. In addition, construction land and traffic networks have profound detrimental impacts on the environment. Therefore, considering both prior studies and the distinctive context in China, this research identified seven threat factors: cropland, three classes of construction land, and traffic networks. The parameter settings for the threat factors in this study were primarily based on existing research findings. Urban land has the most significant impact on habitat, with multiple studies setting its weight between 0.8 and 1.0 [54; 55; 56; 57]. Cropland was given a weight of 0.6, which aligns with the range of 0.5-0.68 established in existing studies [56], and rural land was also given a weight of 0.6, which is consistent with the findings in the literature [58; 59]. The weights for expressways and railways were set at 0.7 based on the findings of previous studies [56], while roads were assigned a lower weight of 0.5 [58; 60]. In terms of spatial decay characteristics, an exponential decay function was adopted on the basis that the influence of point-source threats, such as urban land and rural land, decreases rapidly with distance. In comparison, a linear decay function was selected for linear features, such as cropland and transportation infrastructure [54; 55; 59]. The maximum influence distances for various factors were taken from related studies [55; 56; 60]: 10 km for urban land, 5-6 km for rural land, 1-3 km for cropland, and 3-8 km for transportation facilities. All these parameter settings are within reasonable ranges established by previous research. The maximum threat range, weight, and distance decay function were assigned to each threat factor based on previous studies (Table 2) [11; 13; 21; 61; 62]. The direct validation of the accuracy of the assessment results is a very challenging and difficult task due to the lack of well-recognized ground-truth habitat quality datasets. Nevertheless, it should be noted that both the FLUS and InVEST models adopted in this research are well-established and widely used methods with proven computational workflows and generally accepted input factors. The assessment factors in this study were selected with reference to related research in China [57], thereby ensuring the comparability of results.