Rapid urbanization has exacerbated the urban heat island effect, posing a significant threat to human health and urban ecosystems. While numerous studies have demonstrated that urban morphology significantly influences land surface temperatures (LSTs), few have systematically explored the impact and contribution of urban morphology on LST across different functional zones. Therefore, this study takes Xi’an as a case and employs an interpretable CatBoost-SHAP machine learning model to evaluate the nonlinear influence of building landscape features on LST in different functional zones during summer. The results indicate the following: (1) The highest LST in the study area reached 52.68 °C, while the lowest was 21.68 °C. High-temperature areas were predominantly concentrated in the urban center and industrial zones with dense buildings, whereas areas around water bodies and green spaces exhibited relatively lower temperatures. (2) SHAP analysis revealed that landscape indicators exerted the most substantial impact across all functional zones, with green space zones contributing up to 62%. Among these, fractional vegetation coverage (FVC), as a core landscape factor, served as the primary cooling factor in all six functional zones and consistently demonstrated a negative effect. (3) Population density (POP) exhibited a generally high SHAP contribution across all functional zones, showing a positive correlation. Its effect was most pronounced in commercial zones, accounting for 16%. When POP ranged between 0 and 250 people, the warming effect was particularly prominent. (4) The mean building height (MBH) constituted a major influencing factor in most functional zones, especially in residential zones, where the SHAP value reached 0.7643. Within the range of 10–20 m, the SHAP value increased sharply, indicating a significant warming effect. (5) This study proposes targeted cooling strategies tailored to six functional zones, providing a scientific basis for formulating targeted mitigation strategies for different functional zones to alleviate the urban heat island effect.
Understanding residents’ and tourists’ public space perceptions and satisfaction was essential for the sustainable planning and tourism development of historic towns. However, limited attention has been paid to the different perceptions between the two groups, as well as the nonlinear relationship between public space perception and satisfaction. Taking Fenghuang Ancient Town as the study area, this study used independent sample t-tests to examine the differences between residents and tourists. The XGBoost-SHAP model was further applied to identify key influencing factors and nonlinear interaction mechanisms affecting satisfaction. The results showed that: (1) residents perceived higher public awareness, space openness, and accessibility, whereas tourists reported higher crowd density and business prosperity; (2) color harmony most strongly influenced residents’ satisfaction, while spatial comfort had the strongest influence on tourists’ satisfaction; (3) color harmony and spatial comfort positively affected satisfaction, whereas space openness (residents) and crowd density (tourists) showed U-shaped relationships; and (4) for residents, the strongest interaction was between color harmony and business prosperity (0.015), while for tourists it was between spatial comfort and color harmony (0.038). These findings provided evidence-based guidance for sustainable public space planning and cultural heritage tourism management, contributing to inclusive governance and the long-term sustainability of historic towns.