Abstract
This study conducted a comprehensive analysis of the relationships between environmental factors and urban morphology in small towns of the Qinba Mountains in Southern Shaanxi using Earth observation data and advanced spatial analysis methods. Through the application of U-Net3+ deep learning model and concave hull algorithm, the study successfully extracted and precisely defined the boundaries of 123,992 buildings across 358 small towns. The environmental clustering analysis, employing Self-Organizing Map (SOM) algorithm, identified six distinct environmental types, revealing significant heterogeneity in environmental conditions. The morphological analysis, utilizing ten quantitative indicators, revealed eight distinct urban form clusters, ranging from compact patterns to expansive metropolitan forms. The correlation analysis demonstrated strong relationships between environmental and morphological characteristics, with slope and NDVI showing the strongest correlations with urban development patterns. The Minimum Spanning Tree (MST) analysis further revealed how these patterns manifest spatially, from concentrated distributions in favorable environments to dendritic patterns in challenging terrains. The findings highlight the crucial role of environmental conditions in shaping urban development patterns and provide valuable insights for sustainable urban planning in mountainous regions. The study contributes to urban morphology research by establishing a quantitative framework for analyzing environmental-morphological relationships and demonstrates the effectiveness of combining machine learning with spatial analysis methods in understanding complex urban-environment interactions.
Similar content being viewed by others

Introduction
Small towns are an indispensable part of the modern urban system, acting as crucial nodes to link urban and rural areas, and playing a significant role in both regional economic development and environmental protection1. In China’s urban hierarchy, small cities are defined as settlements with resident populations of 500,000 or less, while small towns specifically refer to designated towns that serve as central places in rural areas with average populations of 6,000–8,600 people in built-up areas. According to China’s administrative system, these small towns are important drivers for urbanization but lack autonomy in land management, urban planning, and financial decision-making, functioning as the lowest administrative units under county-level governance2. Despite their limited scale and authority, small towns serve as critical intermediaries in the urban-rural continuum, playing essential roles in regional development and resource distribution3. Compared with large cities, small towns are middle-sized with compact communities and are proper units in promoting diversified local economies for balancing resource allocation and easing ecological pressure4. With acceleration in the pace of urbanization, large cities have increasingly faced problems arising from the centralisation of resources and consequently imbalance with acute pressure on land demand. While such centralisation of resources, particularly in metropolitan cities, may lead to serious ecological and socio-economic effects, environmental degradation, congestion, and inequality in services provided5. Meanwhile, small towns particularly those lying within the most ecologically sensitive or resource-scarce regions have steadily risen through the ranks to serve as important agents for furthering sustainable and coordinated urban rural integration. These small towns reveal their unique adaptability in terms of the resource base and facilitate eco-friendly practices, demonstrate more flexible and context-specific morphological patterns6. They thus coordinate development processes effectively between urban and rural areas in a key manner7. This environmental adaptability is particularly evident in mountainous regions, where topographical constraints and ecological factors significantly influence urban morphological evolution8. Recent studies have shown that these small towns develop distinct spatial forms in response to environmental factors such as topography, vegetation coverage, and hydrological conditions9,10. Understanding these interactions between urban morphology and environmental factors provides essential insights for sustainable urban planning and development in environmentally sensitive regions.
The Qinba mountainous region in southern Shaanxi holds strategic importance in China’s western development strategy and serves as a crucial ecological security barrier in central China. As the primary water source for the national South-to-North Water Transfer Project, this region balances critical ecological conservation with the socioeconomic development needs of its rural communities3. Within the broader context of China’s rapid eastern coastal urbanization, the Qinba Mountains represent a contrasting development paradigm where small towns must navigate between preserving ecological integrity and pursuing economic growth. Small towns in this region are filled with great dispersion and heterogeneity from the mountainous and hilly landscapes. Ecological factors such as slope, altitude, soil types, and the amount of rainfall straightforwardly affect the morphological evolution of these small towns. The distribution and ecological adaptability of small towns are closely related to diversified topographical features, which are in line with ecological demands, with their specific spatial forms being developed as a result. For instance, studies show that landscape change patterns in mountainous areas often become complex due to urban expansion, and topographical conditions significantly constrain town expansion11. Compared to the model in the plain areas, it is hard for the traditional urban morphology studies to work effectively in the hilly and mountainous areas, where topographical constraints obviously exist. On the other hand, research shows topographic and resource constraints in these areas may lead to spatial heterogeneity and dynamic changes in morphological development. It can be said, for example, that land use change is the most powerful factor in the town morphology of Hantai District. From this perspective, one could observe gradually the transformation of land use pattern from natural randomness to structured serrated expansion form. For example, spatial morphology fragmentation has been gradually represented12. Moreover, mountain towns face some natural and ecological issues, including soil erosion and ecological fragmentation. Speaking in relation, ecological network construction is an important way to maintain regional ecological connectivity. It cited southwest Hubei as an example, where optimizing ecological corridors and nodes according to the course of ecological network development promotes regional ecological safety and biodiversity protection13.
In the analysis of small town morphology and environmental factors, building footprint extraction and the selection of multidimensional morphological indicators are key to deeply characterizing building features and spatial distribution patterns. Recent advances in data-driven urban morphology have demonstrated the potential of using big data and user-generated content from platforms like OpenStreetMap to analyze urban form and spatial patterns at multiple scales14. In this respect, the UNet neural network for automatic building footprint identification, relying on deep learning from high resolution remote sensing images, is proposed for high accuracy and efficiency in extracting large scale building features15. Building footprint extraction not only provides foundational data for subsequent morphological analysis but also effectively supports studies on urban morphology adaptability regarding both ecological and human habitats. Among the indicators, recording building perimeter, area, circularity, longest axis length, and fractal dimensions were selected for being effective in the characterization of urban forms and the morphology analysis of cities16,17,18. Recent advances in urban morphology research have further emphasized the importance of comprehensive morphological tessellation approaches for understanding urban spatial structures19. These indicators offer comprehensive data support from many different aspects. In particular, it is the perimeter and area of the building that describe the size of the basic form of a city circle and the longest axis length characterizes compactness and the buildings’ spatial extension. These metrics have broad applications in the study of urban morphology, where it helps to understand the relationship between the boundary in the area of urban studies and the internal spatial structures20. As will be noticed later, the area-perimeter ratio can be seen as another normal measure considering urban compactness that encompasses development patterns signifying geometrical properties of the expansion and complexity of boundaries. The indicator fractal dimension quantifies the complicated boundary configuration and multi-scale structure in urban morphology. Some internal irregularities and features of urban forms, on the other hand, may advantageously be considered under fractal dimension analysis21. Moreover, fractal dimensions are quite frequently used for the comparison of the morphological characteristics of different regions. for example, once fractal analysis had been carried out for Brussels, substantial correlations between urban structures and such parameters as rent distance and income were disclosed, thus providing a fractal basis for quantifying in urban spatial planning22. Regarding the selection of environmental factors, this paper comprehensively covers multiple environmental indicators involving soil type, elevation, slope, land use, Normalized Difference Vegetation Index (NDVI), and distance to rivers. Soil type and slope are directly related to the stability and developmental direction of urban morphology, especially in places with mountains or topographic complexity. As a critical parameter indicating vegetation coverage, NDVI has been applied to assess the proportion of green spaces and environmental quality. It follows from the research that these ecological factors have great influence on building distribution density and layout characteristics in morphological features studies23. In this way, through a complete coupling analysis framework of these morphological and environmental indicators, the study will be able to have an in-depth investigation of the complex relationship between urban morphology and such environmental factors, which serve as quantitative supports for urban forms in different ecological contexts.
Some unsupervised learning methods have been widely applied in urban morphology and complex environmental data analysis, among which the SOM algorithm occupies an important position. The SOM algorithm possesses powerful dimensionality reduction and pattern recognition capability, with advantages in handling multidimensional and complex data to fit the small town data with complex factors both in the environment and morphology24. In this research, the clustering of SOM algorithm for building morphological and environmental data into distinct types is integrated and used in such a way that could better reveal the characteristics of the spatial distribution of small towns under different ecological conditions, further offering support to research on ecological adaptability. In recent years, a general acceptance of the SOM algorithm has prevailed in morphological studies under complicated environmental conditions. For instance, the use of SOM for automatic zoning of environmental monitoring datasets makes provisions for the identification of environmental drivers on town structures and thus enables support for eco-adaptive decision making at a regional planning level25. Furthermore, the SOM algorithm has definite advantages with respect to clustering and visualizing geospatial data. The approach has also been applied in analyzing data about the urban built environment to support the identification of areas that have similar social and environmental features as important to attaining insight into the dynamics between the growth of urban areas on one hand and ecological limitations on the other26. To sum up, as the innovative unsupervised learning method, the SOM algorithm offers one of the most imperative tools for the study of coupling relationships between small town morphology and environmental factors. It provides not only the support to reduce dimensions and visualize data but opens a more scientific frame to spatial analysis itself by automatic clustering over various ecological contexts. Additionally, to analyze the spatial distribution characteristics of environmental clusters, the Minimum Spanning Tree (MST) method has emerged as a powerful tool in urban spatial analysis. For instance, an Extended Minimum Spanning Tree (EMST) method has been applied to characterize local urban patterns by analyzing spatial proximity and building morphology, providing essential information for urban planning and management27. The MST algorithm effectively represents spatial relationships within urban settings, enabling clustering of buildings and environmental attributes based on proximity. Notably, MST has demonstrated particular effectiveness in characterizing local urban patterns by analyzing inter-building distances and spatial relationships28. Recent research has demonstrated the effectiveness of spatial network analysis in data-scarce contexts, comparing Space Syntax metrics with location-based accessibility methods to understand urban spatial patterns29. Such applications highlight MST’s potential for identifying regional clusters based on geospatial patterns. Furthermore, the integration of graph theory approaches has proven valuable for analyzing ecological connectivity at national scales, as demonstrated in recent forest network studies30, while morphological analyses have been enriched by examining spatiotemporal variations in land quality and form31.
Despite the growing recognition of small towns as critical intermediaries in urban-rural systems, existing literature exhibits substantial gaps in understanding their morphological evolution and environmental interactions. Current research predominantly focuses on metropolitan areas, employing analytical frameworks that inadequately capture the unique spatial characteristics and environmental dependencies of small-scale settlements. This methodological bias is particularly pronounced in mountainous regions, where complex topographical constraints and ecological sensitivities fundamentally shape urban form and development trajectories. Traditional urban morphology theories, developed primarily for plains-based settlements, fail to account for the adaptive strategies and spatial configurations that emerge in response to steep slopes, fragmented terrain, and limited developable land. To address these theoretical and methodological limitations, this study presents an integrated analytical framework that combines advanced morphological indicators with machine learning techniques, specifically employing Self-Organizing Map (SOM) algorithms for pattern recognition and classification. By focusing on 358 small towns in the Qinba mountainous region of Southern Shaanxi, this research systematically examines how topographical diversity, ecological constraints, and environmental heterogeneity influence urban morphological patterns, thereby contributing to a more comprehensive understanding of small town development in complex terrain environments.
Materials and methods
Study area
The main study area covers the region of the Qinba Mountains in Southern Shaanxi (Fig. 1). The Southern Shaanxi Qinba Mountain area is an important geographical unit in the southern part of Shaanxi Province, renowned for its unique natural environment and cultural characteristics. It includes mountainous and hilly areas of south Shaanxi, lying between the Qinling Mountains and the Bashan Mountains. It is a nationally poor area and is also located in a heavy rain region. the Southern Shaanxi Qinba Mountain area has a subtropical humid climate, with distinct seasons, and abundant rainfall. Most of this area has a complex landform and often suffers from floods, landslides, and other natural disasters featuring mudslides32 . The undulating topography forms a unique mountainous landscape, the area features a rich variety of vegetation types, including forests, shrubs, and grasslands, which provide a range of ecosystem services33. The small towns in the Southern Shaanxi Qinba Mountain area exhibit complex relationships in the interaction of spatial structure and environmental factors. The region’s topographical features in this region bring higher risks of soil erosion and geological disasters, which directly influence the layouts and developments of the towns. The small towns in the Southern Shaanxi Qinba Mountain area are faced with challenges from environmental factor interactions in their unique advantages of natural geography. Geographical features, climate conditions, and socio-economic activities are interrelated and deepen the background of researching morphology and environmental factor relationships of small towns.
Data acquisition
The environmental data for this study are sourced from a variety of publicly available datasets. The DEM data are from the Geospatial Data Cloud (http://www.gscloud.cn/ (accessed on 3 November 2024)) with a spatial resolution of 30 m, and the slope and slope change data are derived from the DEM. The annual mean precipitation and annual maximum precipitation data are sourced from China’s 1 km resolution annual precipitation data, provided by the National Earth System Science Data Center, National Science & Technology Infrastructure of China (http://www.geodata.cn (accessed on 3 November 2024)). Additionally, the land cover data are from the GlobeLand30 Global Geographic Information Public Product (National Geomatics Center global land cover data product service website http://www.webmap.cn (accessed on 3 November 2024)), which includes various land cover types such as cropland, forest, grassland, shrubland, wetland, water body, moss land, artificial surface, bare land, and glaciers and permanent snow. The NDVI vegetation cover data are obtained through processing and acquisition using Google Earth Engine (GEE) and are from NASA (https://modis.gsfc.nasa.gov/ (accessed on 3 November 2024)) MOD13Q1 data, with a time interval of 16 days for the whole year. The NDVI values for the study area are derived from the maximum value, ranging from 0 to 1. The soil type data are sourced from the Harmonized World Soil Database (HWSD) version 2.0 (https://gaez.fao.org/pages/hwsd). The river data are sourced from OpenStreetMap (https://www.openstreetmap.org/), and the shortest distance from the town center to the river is calculated using Python.
Complementary to the environmental data, the urban morphology data for this study originate from a variety of high-resolution Earth Observation image datasets. Google Earth supplies high-resolution satellite imagery in tile format, integrated from composite images from satellites such as Maxar, Airbus, Terrametrics, QuickBird, and WorldView. Basically, these data can be downloaded in several ways: for instance, through Google Earth Pro, it is possible to download images using the maximum resolution, while through third-party programs, such as SAS Planet, it is possible to extract the data from the Google Earth portal. SAS Planet is free software widely used for research and study purposes that can download georeferenced images from services such as Google Earth, Bing Maps, and ESRI34,35,36. For downloading the image tiles relevant to this study, the SAS Planet software(v.230909) was used, which at zoom level 19, attained a spatial resolution of 0.6 m. Since the focal point of this study was on the small towns across the Qinba Mountains in southern Shaanxi, the volume of downloaded data did not constitute “large-scale data download,” thus conforming with guidelines on the use of data. The dataset was created specifically for this study since there were not sufficient existing datasets for small towns, consisting of 16,128 manually annotated training images from high-resolution Google Earth imagery. The U-Net3+ model was selected for this task due to its successful applications in image segmentation. The model’s performance was rigorously validated on a test dataset from the Banqiaozhen region, achieving an IoU of 0.6472 for raw predictions, which improved to 0.7915 after OpenCV post-processing. The high precision (99.01%) indicates minimal false positives, while the recall of 79.78% demonstrates the model’s capability to identify most building structures despite the challenging mountainous terrain. The F1-score of 0.8836 confirms the balanced performance between precision and recall. Therefore, it is used in such a manner to extract data about the footprints of buildings as accurate as possible and could provide structural outlines within these small towns.
Method
This study adopted Self-Organizing Maps(SOM) for the clustering of environmental factors and urban morphology features. SOM is an artificial neural network that has generally proven its worth in representing high-dimensional data with its lower-dimensional representations while preserving the topological relationship of the dataset. In this regard, SOM is particularly useful for clustering tasks in spatial analysis37. The training size of the neural network was set to 358 towns. To determine the initial map size, we utilized the Vesanto formula, \(5\sqrt{n}\) (where \(n\) is the number of samples). This formula provides a starting point for the dimensions of the SOM grid. Following this, the optimal map size was established based on minimizing the Quantization Error (QE) and Topographic Error (TE) values. QE quantifies the average distance between each data vector and its corresponding best-matching neuron, while TE assesses the network’s accuracy in maintaining the topology of the data38. For clustering, both environmental and urban morphology features were analyzed. The SOM algorithm was executed in R studio(4.3.3) using the ‘kohonen‘ package, which facilitates the implementation of SOMs. This package allows for the customization of various parameters, including the number of iterations and learning rates, thereby enhancing the clustering process39. Figure 2 illustrates the structure of the SOM neural network, which includes the input layer, output layer, and interconnecting weights. The input layer consists of the environmental and urban morphology features, while the output layer represents the mapped neurons. The interconnecting weights are crucial as they determine the relationship between the input data and the neurons, guiding the learning process and clustering of similar data points.
The research proposes an integrated approach for the morphological analysis of small towns, incorporating small town district identification, building footprint extraction, boundary delineation, and a quantitative assessment of morphological characteristics. So, it identifies the building footprint through the U-Net3+, followed by extracting small town districts. It is a crucial step since it delineates the base for spatial analysis of urban forms. After footprint extraction, DBSCAN was employed for an efficient delineation and visualization of small town areas in this research. The algorithm parameters were optimized specifically for mountainous small towns: the epsilon radius (\(\varepsilon\)) was set to 0.001 degrees (approximately 111 meters at this latitude), determined through iterative testing to balance between capturing dispersed mountain settlements and avoiding over-segmentation. The minimum samples parameter (minPts = 10) was selected to ensure robust cluster formation while accommodating the typical building density in mountain towns, where peripheral areas may have sparse building distributions. This parameter combination was validated on a subset of 36 towns (10% of the sample), achieving 92% accuracy in boundary delineation compared to manual annotations. Its automatic clustering property makes DBSCAN particularly effective for large-scale urban studies, facilitating the analysis of multiple towns in a straightforward and scalable manner40. This novel clustering algorithm differentiates the frontiers of the towns and provides insight into their spatial structures and functional areas. The use of DBSCAN automatically captures the boundaries in such a way that it allows neighboring rural areas to be excluded in order to retain focus only on the urban entity. In general, the boundary of a small town in previous research was determined by stressing the administrative boundary formulated by the government. However, the data collection for small towns with complicated mountain terrain is very difficult, thus making sure the boundaries of the towns need to be calculated using geospatial data and computational geometry. This work refines the identification of boundaries by incorporating both convex and concave hull algorithms. This study utilizes the Python libraries Shapely41 to calculate the convex hull and Alphashape42 to compute the concave hull, offering a dependable approach for precise boundary detection. The convex hulls capture the general approximation of the spatial shape, whereas concave hulls produce a more accurate representation of complex boundaries. The study obtained accuracy enhancement of boundary delineation by iteratively computing these hulls, therefore this approach takes into account the particular challenges brought about by the geographical complexities of the Qinba Mountains. Integration of these algorithms provides good understanding of the spatial configuration of small towns that leads to a more nuanced representation of their boundaries. Then, a set of morphological indicators will be computed with the purpose of describing the quantitative aspects of the urban form: area, perimeter, fractal dimension, among the main morphometric parameters, all important to bring out in detail the features of such small towns. The fractal dimension, of importance, will be calculated by using the box-counting method43, enabling the effective studying of the basic spatial complexity lying under the ground structure of the towns. Figure 3 illustrates this entire methodology, showing the complete pipeline from initial building footprint extraction through U-Net3+ deep learning, followed by OpenCV-based morphological refinement to enhance extraction accuracy, then proceeding to small town district identification, precise boundary recognition using hull algorithms, and culminating in the final morphological calculation step.
Results
Analysis of environmental characteristics of small towns
The environmental characteristics of small towns in the Qinba mountainous region were analyzed through multiple dimensions including soil type, elevation, slope, land use, NDVI, precipitation, and distance to rivers. These environmental factors collectively shape the development patterns and spatial distribution of small towns in this region. The elevations of small towns in the Qinba Mountains area have obvious spatial patterns and characteristics. It is based on the DEM analysis, the topographic elevation of small towns in the research area varies from 152 m to 3065 m. Using quantile-based classification, the distribution of elevations is divided into five classes. The spatial pattern of small towns indicates a clear relationship with elevation gradients as well. Indeed, the highest number of towns, 249 approximately, accounting for about 69.5% of the total, is located on the lower range (152–694 m), but most of them are centralized in the middle and southern parts of the area under scrutiny. Then again, there are 68 towns in the middle range order, standing at 694–936 m and accounting for 19%, while 8.7%, that is 31 towns, set their locations between 936 to 1155 m. Only about 10 towns are within the higher elevation range, which falls between 1155 to 1439 m, and surprisingly, there is no town that fits into the highest elevation category, which is in the range of 1439–3065 m. In fact, the general pattern of elevation is rather closely dendritic, considering the general arrangement of valleys and ridgelines. Conforming to this model, structure may include branching patterns that resemble the general shape of trees, reflecting complex fluvial erosion processes and geological structures underlying this region. The gradient of elevation increases mostly from south to north, with higher elevations starting to be generally in the northern sections of the study area. This topographic configuration has reflected a strong impact on the spatial organization of smaller towns. Since, in general, it follows that the settlement develops along the corridors of the valley while avoiding the belts of highest elevation. Slope analysis shows a significantly large variation from \(0^{\circ }\) to approximately \(74.64^{\circ }\), indicating the complex topography of the study area. The distribution of slope was further subdivided into five categories: from gentle to steep gradients using quantile-based classification methods. Distribution across the slope gradients is statistically less preferred in the direction of a gentle slope. More than 85.2% of the total towns are located in relatively moderate slopes within the lowest category. The second category of slope sees a significant drop to about 11.7%. Very few of the remaining settlements are found across the next higher slope categories, with less than 3.1% of the towns found in areas of high slope gradients. The spatial distribution exhibits a clear inverse relationship between slope steepness and settlement frequency. Towns predominantly cluster in areas of gentler slopes, typically valley bottoms and lower hillsides, while avoiding steeper terrain. The NDVI analysis indicates that the variation of vegetation cover in the study area is high, ranging from 0.17 to 1.00. Using the Jenks Natural Breaks classification technique, the distribution of NDVI was categorized into five classes of distinct features. The study did a statistical analysis to understand the pattern of location preference of towns with vegetation coverage. Most of the towns have shown their preference for locations where vegetation lies in the moderate range. About 64.2% of the settlements fall within the NDVI value range of 0.55–0.79, while 23.5% of the towns fall within areas where the vegetation is more concentrated value between 0.79 and 0.87. The pattern shows a distribution in such a way that it balances the need for urban development with ecological preservation, since towns are primarily set up in areas that show not only promise for development but also environmental sustainability. Analysis of annual precipitation patterns across the study area reveals substantial spatial variation, with values ranging from 654.3mm to 1200.6mm. The precipitation distribution exhibits a south to north gradient, with higher annual precipitation values predominantly concentrated in the southern portions of the study area.Land use analysis of small towns in the study area reveals distinct patterns of development and human-environment interaction. The majority of towns (235, representing 65.6%) are situated on artificial surfaces, indicating significant urban development. A substantial number of settlements (90 towns, 25.1%) are located on cultivated land, reflecting the region’s agricultural heritage and importance. Soil type analysis reveals a diverse pedological landscape dominated by Haplic Luvisols (LVh), which covers the largest area within the study region. The second most prevalent soil type is Eutric Cambisols (CMe), followed by significant distributions of Dystric Cambisols (CMd). These three soil types represent the primary pedological characteristics of the region, with Luvisols indicating areas of clay accumulation and good drainage, while Cambisols suggest younger, moderately developed soils with good agricultural potential. The environmental characteristics of small towns in the Qinba mountainous region reveal distinct spatial patterns across multiple dimensions. The river proximity assessment employs a geospatial analysis approach to examine the spatial relationships between town locations and river networks in the Qinba mountainous region. Distance analysis reveals that the majority of towns (34.6%) are situated within 100 meters of the nearest river, while another substantial portion (30.2%) lies between 100–200 m, indicating a strong preference for riverside locations in town development. This distinct proximity pattern reflects the significance of water resources in settlement development, with over 64.8% of towns established within 200 meters of rivers, demonstrating the crucial role of water accessibility in shaping the region’s urban landscape. Figure 4 presents the spatial distribution of these six key environmental factors (elevation, slope, NDVI, precipitation, land use, and soil types) across the study area.
Clustering of environmental factors in small towns using the SOM method
The determination of optimal cluster numbers is crucial for effective Self-Organizing Map (SOM) analysis. To determine the optimal number of clusters, this study utilized two widely recognized validation indices: the Davies-Bouldin index and the silhouette coefficient. The Davies-Bouldin index evaluates clustering algorithms based on internal scatter within clusters and separation between clusters44, while the silhouette coefficient measures both cohesion and separation of clusters by calculating the mean intra-cluster distance and the mean nearest-cluster distance for each sample45. These two metrics were selected based on their complementary strengths in cluster validation. The Davies-Bouldin index is particularly effective in evaluating the compactness and separation of clusters, making it suitable for datasets with varying cluster densities46. The silhouette coefficient, through its second-order difference analysis, provides additional validation by identifying significant changes in cluster structure47. The combined use of these indices has been demonstrated to provide more robust cluster number determination compared to single-index approaches48. Through the application of these validation methods, six distinct clusters were identified as the optimal number for characterizing the environmental factors of small towns in the study area.
Following the cluster validation analysis, the SOM configuration was optimized using a \(10 \times 10\) grid structure, determined through the minimization of quantization and topographic errors. This grid dimension was initially estimated using Vesanto’s rule, yielding approximately 95 nodes, which led to the final \(10 \times 10\) configuration that effectively balanced representation while maintaining topological relationships. While slope and elevation exhibit inherent correlation in mountainous terrain (as slope is derived from elevation gradients), both variables were retained in the SOM analysis because they capture different aspects of topographic constraints on urban development: elevation relates to absolute positional constraints and climate zones, while slope directly influences construction feasibility and land stability. The SOM algorithm’s competitive learning mechanism naturally handles such correlations by distributing related features across neighboring neurons, thereby preserving the essential topographic information while avoiding redundancy in the final clustering results. The SOM analysis revealed six distinct environmental typologies among the small towns, as illustrated in Fig. 5. The spatial distribution of these clusters demonstrates clear geographical patterns across the study area, suggesting systematic variations in environmental characteristics. The component planes visualize the distribution patterns of individual environmental factors, revealing complex interactions among different ecological variables. Soil type distributions show concentrated values in central regions, while elevation patterns display a distinct north-south gradient transitioning from cooler to warmer colors. Slope characteristics cluster prominently in the upper right section, correlating with areas of steeper terrain. Land use patterns exhibit a sharp contrast between dominant red coloration on the right side and blue in the lower left, indicating distinct land utilization zones. NDVI distributions present an inverse pattern with extensive red areas in the lower left and blue in the upper right, reflecting varying vegetation density patterns. River proximity shows predominantly blue coloration with limited red areas in the lower right, suggesting relatively consistent patterns of water accessibility across most clusters. Precipitation displays a centralized concentration of higher values with lower values in the corner regions, indicating complex rainfall distribution patterns.
Following the SOM clustering analysis, six distinct environmental typologies were identified, each exhibiting unique combinations of environmental characteristics. Statistical analysis reveals varying distributions of small towns across the six environmental clusters. Cluster 4 dominates with 94 towns representing 26.3% of all settlements, followed closely by Cluster 1 with 92 towns accounting for 25.7%. Clusters 5 and 2 show moderate representation with 72 towns (20.1%) and 58 towns (16.2%) respectively, while Clusters 6 and 3 comprise fewer towns with 29 and 13 towns respectively, suggesting that certain environmental conditions may be less conducive to small town development.
Elevation analysis reveals a systematic relationship between town development and topographic conditions. Towns in Cluster 6 are predominantly situated at lower elevations, followed by Clusters 5 and 4, while Clusters 1, 3, and 2 occupy progressively higher elevations. Slope analysis shows a descending gradient from Cluster 6 through Clusters 3, 1, 2, 5, to Cluster 4, indicating diverse terrain conditions that influence town development patterns. The interaction between towns and land use patterns demonstrates clear differentiation. Towns in Clusters 4 and 5 are characterized by extensive artificial surfaces, indicating more intensive urban development, while those in Cluster 1 maintain stronger agricultural connections through dominant cultivated land use. Vegetation coverage, as measured by NDVI, shows a clear hierarchical pattern among clusters. The highest vegetation density is observed in Cluster 2, followed by Clusters 6, 1, 3, 5, and 4. Notably, Cluster 4 exhibits significantly lower vegetation coverage compared to other clusters, suggesting intensive urban development. Precipitation patterns also display distinct variability across clusters, with Cluster 5 receiving the highest rainfall, followed by Clusters 2, 6, 1, 3, and 4. Land use patterns show notable differentiation among clusters. Clusters 4 and 5 are predominantly characterized by artificial surfaces, indicating significant urban development, while Cluster 1 is primarily associated with cultivated land, suggesting an agricultural focus.
Based on these cluster patterns, detailed analysis reveals distinct environmental characteristics of small towns within each typology. Small towns in Cluster 4, representing the largest group, exhibit distinctive development patterns characterized by the lowest slope values, relatively low elevation, and notably lower NDVI values. In contrast, small towns in Cluster 2, comprising 16.2% of the total, demonstrate strong ecological characteristics, featuring the highest NDVI values coupled with relatively high elevation and precipitation levels. Small towns in Clusters 5 and 6 represent different adaptation strategies to environmental conditions. The relatively large number of towns in Cluster 5 (72 towns) have developed in areas with the highest precipitation levels but relatively low elevation and slope values, primarily on artificial surfaces, suggesting urban development in accessible locations. Conversely, the fewer towns in Cluster 6 have adapted to more challenging terrain with the highest slope values, while maintaining relatively high precipitation and NDVI levels. Cluster 3 is characterized by the greatest average distance to rivers. This cluster shows relatively high elevation and slope values, ranking second and second highest respectively. Small towns in Cluster 1, representing the second-largest group with 92 towns, demonstrate a balanced development pattern characterized by intermediate values across environmental factors and a focus on agricultural land use. The high number of towns in this cluster suggests that this balanced approach to environmental integration represents a successful and widely adopted development strategy in the region. The comprehensive visualization of cluster characteristics and spatial patterns (Fig. 6) provides a clear representation of the environmental clustering results.
To further understand the spatial organization of environmental clusters, a Minimum Spanning Tree (MST) algorithm was employed to analyze the spatial distribution patterns of towns within each cluster. MST analysis has gained significant attention in geographic information science for its ability to reveal spatial relationships and network structures49. The MST analysis revealed distinct spatial organization patterns that correspond to the environmental characteristics of each cluster. Each cluster demonstrates unique spatial arrangements that reflect their environmental adaptations. Cluster 4, which contains the highest proportion of towns (26.3%), exhibits a concentrated spatial pattern with towns clustering closely together. This concentrated distribution reflects the favorable environmental conditions of this cluster, characterized by the lowest slope values, relatively low elevation, and predominantly artificial surfaces, making it ideal for urban development. In contrast, Cluster 5 (20.1% of towns) displays a unique concentrated-dispersed pattern primarily in the southeastern region, aligning with its environmental characteristics of highest precipitation levels and low elevation and slope values. Particularly noteworthy is Cluster 1, the second-largest group comprising 25.7% of towns, which exhibits a distinctive dendritic distribution pattern. These towns are uniformly distributed across the study area, following mountain topography and forming clear branch-like structures. This spatial arrangement reflects the cluster’s balanced environmental characteristics, with intermediate values across most environmental factors and a mix of artificial and agricultural land uses, demonstrating effective adaptation to mountainous terrain through valley systems. Cluster 2, representing 16.2% of towns, shows a dispersed branch pattern that directly corresponds to its challenging environmental conditions, including the highest elevation and NDVI values. This spatial arrangement indicates how towns have adapted to environmental constraints while maintaining necessary connectivity. The branching pattern emerges as a response to complex topography and high ecological value areas. The MST analysis thus reveals the intricate relationship between environmental factors and spatial organization patterns. From concentrated patterns in favorable environments (Cluster 4) to dendritic structures in balanced conditions (Cluster 1) and dispersed patterns in challenging terrains (Cluster 2), these spatial arrangements demonstrate how small towns adapt their distribution patterns to local environmental conditions. This spatial analysis provides significant input to regional planning strategies for sustainable development in mountainous regions by depicting how environmental factors have shaped urban development in shaping up strategies for spatial organization. These distinguished patterns expose how small towns in the Qinba mountainous region have adapted and been shaped by their local environmental conditions. These different development patterns and numbers of towns for each cluster represent different strategies of sustainable urban development given specific combinations of environmental constraints and opportunities, and it is apparent that under some environmental conditions more dispersed small town development is supported than under others.
Clustering analysis of urban morphology of small towns using the SOM method
The quantitative analysis of urban morphology first requires accurate extraction of town spatial data. In this study, a comprehensive urban morphological database for small towns in the Qinba Mountain Area of southern Shaanxi was established through advanced remote sensing and deep learning techniques. The extraction process involved multiple steps to ensure data accuracy and reliability. First, high-resolution remote sensing imagery was processed using U-Net3+ deep learning architecture, which was specifically chosen for its enhanced multi-scale feature aggregation capabilities and improved deep supervision mechanism50. The network’s redesigned full-scale skip connection mechanism significantly improved the accuracy of feature recognition51. Through this process, a total of 123,992 buildings were successfully identified and digitized across the study area. The town boundary delineation process integrated multiple data sources and algorithms. Initial town center points and approximate extents had been derived from OpenStreetMap, which provided the baseline reference data for spatial analysis. The building footprint data was optimized using methods from OpenCV to enhance outline clarity and geometric accuracy. Such refinement has been absolutely important in securing the accuracy of subsequent morphological analysis. Finally, by applying the iterative concave hull algorithm after the building footprint optimization, a more detailed town boundary was obtained that closely reflected the actual real urban form of every single settlement. In the process, through this multi-step procedure, comes the creation of a morphological dataset of the internal structure and the external limits of the small towns. The results of urban morphological extraction across the study area are presented in Fig. 7, demonstrating the diverse spatial patterns of small towns in the Qinba mountainous region. Twelve representative towns were selected across diverse topographical contexts to demonstrate the morphological variations.
Building footprint and boundary extraction results for small towns in in the Qinba Mountains of Southern Shaanxi. Detailed zoom-in views of selected areas demonstrate the precision of U-Net3+ building extraction, showing individual building footprints clearly delineated despite varying building sizes and densities typical of mountain towns.
Similar to the environmental clustering approach, the determination of optimal cluster numbers for morphological analysis employed the Second Difference of Silhouette Score method. The analysis revealed eight distinct morphological clusters as optimal, with the SOM configuration maintaining a \(10 \times 10\) grid structure to ensure consistent analytical framework. The distribution of towns across these eight clusters shows considerable variation: Cluster 3 contains the largest number of towns (145), followed by Cluster 2 (85), while Clusters 6 and 8 contain relatively few towns (12 and 4 respectively). The detailed morphological characteristics of these eight clusters are revealed through multiple analytical dimensions and visualization methods, as shown in Fig. 8.
Morphological analysis results of small towns in the Qinba Mountains of Southern Shaanxi: (a) SOM clustering visualization showing the distribution of morphological types; (b) Morphological clustering analysis results; (c) Minimum Spanning Tree analysis revealing spatial organization patterns of different morphological clusters.
In the analysis of urban morphology, eight distinct clusters were identified through the SOM method based on ten quantitative indicators: perimeter, area, roundness, length of longest axis, average distance from centroid to corner, aspect ratio, number of buildings, total building perimeter, total building area, and fractal index. The selected morphological metrics have been widely employed in urban morphometric studies52,53,54,55. The morphological characteristics of the eight clusters are summarized in Table 1, which presents the fundamental spatial features of each cluster type based on three key dimensions: shape, size, and density. Researchers commonly use these factors to analyze different urban typologies across scales and regions56. Studies in compactness and urban design further indicate that compactness, as an attribute closely tied to shape and density, not only defines the spatial footprint but also has significant implications for urban efficiency, such as reducing travel distances and optimizing resource use57. The shape characteristics range from linear forms with high aspect ratios to compact forms with high roundness values, reflecting diverse spatial organizations. This classification framework effectively captures the morphological diversity of small towns in the Qinba Mountains of Southern Shaanxi, revealing how different combinations of these basic characteristics create distinct urban forms adapted to local environmental conditions.
The clustering results reveal distinct morphological variations among the small towns in the Qinba Mountains of Southern Shaanxi. Cluster 1 (16 towns) is characterized by the highest aspect ratio (approximately 5) among all clusters, small total area (ranking 7th), and moderate building density. These elongated forms typically reflect adaptation to linear geographical features such as valley corridors or ridge lines, suggesting strong environmental constraints on urban development patterns. Cluster 2 (85 towns) exhibits intermediate values across most indicators, ranking 4th in area, 4th in aspect ratio, and 5th in average distance from centroid to corner, with a moderate fractal index, indicating development patterns that balance environmental constraints with urban growth needs. Cluster 3, the most common type containing 145 towns, shows distinctive characteristics of compact development with small area (ranking 2nd smallest), high roundness (ranking 2nd), and relatively low average distance from centroid to corner (ranking 7th). The moderately high fractal index (ranking 4th) suggests these towns have developed incrementally in response to local topographical conditions while maintaining efficient use of limited buildable land. Cluster 4 (42 towns) presents the second-highest aspect ratio and ranks 5th in area, suggesting development patterns that have adapted to linear environmental features while accommodating moderate urban expansion. Cluster 5 (34 towns) features large areas (ranking 3rd), moderate aspect ratio (ranking 5th), and relatively high average distance from centroid to corner (ranking 3rd), indicating development in areas with fewer environmental constraints. Cluster 6 (12 towns) consistently ranks high in size-related metrics, showing the second-largest values in area, building count, and total building area, suggesting locations where topographical conditions permit extensive urban development. Cluster 7 (20 towns) exhibits unique characteristics with the highest fractal index (1.55–1.6) and highest roundness, but relatively small area (ranking 3rd smallest). This combination suggests complex interactions with local environmental conditions, possibly reflecting organic growth patterns in challenging topographical settings. The most distinct group, Cluster 8, though containing only 4 towns, shows the highest values in multiple metrics: largest in area, longest axis length (approximately 2500m), highest building count, and largest total building area. These towns likely represent settlements that have developed in environmentally favorable locations where terrain and other natural conditions support extensive urban expansion. The quantitative analysis reveals how small towns in mountainous regions exhibit different morphological adaptations to their environmental context. The variation in spatial metrics, from the highly elongated forms of Cluster 1 to the compact patterns of Cluster 3 and the extensive developments of Cluster 8, reflects different strategies of urban development in response to environmental constraints and opportunities. The fractal index variations (1.3–1.6) particularly indicate how boundary complexity relates to environmental interactions, with higher values suggesting more intricate relationships with surrounding terrain. These morphological patterns demonstrate the complex interplay between urban development and environmental conditions in mountainous regions. The predominance of certain morphological types (particularly Clusters 2 and 3, totaling 230 towns) suggests that moderate-sized, compact development forms are most adapted to the environmental conditions of the Qinba Mountains, while the rarity of large-scale development patterns (Cluster 8, 4 towns) indicates the significant role of environmental constraints in limiting extensive urban expansion.
The Minimum Spanning Tree analysis was then done to show the organizational pattern of different towns’ types across the study area, furthering the analysis of their spatial distribution characteristics. The most representative cluster, with 145 towns, is very dispersed, with a clearly dendritic structure. Such a tree-like structure indicates that these compact towns are very diffused within the region, following valley systems and adapting to the complex topography of the area. The branching pattern indicative of their distribution says much about how these compact settlements have developed through natural corridors, ensuring links to regional networks. Cluster 2 refers to the 85 towns, which were scattered in a concave distribution pattern with clear directional extension following topographical features. It will be revealed from the MST analysis that these towns have networked systems seemingly extended with the contours of natural terrains, with major branches extending down significant valleys or ridgelines. Such a spatial arrangement, joined by their balanced morphological characteristics, is adaptive development under both environmental constraints and regional connection needs. Cluster 5 with 34 towns and Cluster 7 with 20 towns exhibit concentrated spatial structure and have a tendency to localize groupings along major transportation corridors. Although Cluster 8 has fewer numbers of towns, in fact, only four, the tendency toward spatial clustering is somewhat similar, the larger urban centers take on a linear pattern that likely corresponds to major regional infrastructure and favorable development conditions. Accordingly, with these different morphological types having developed in response to regional geographical conditions in distinct spatial distribution patterns, such striking contrasts-from highly dispersed, dendritic to more concentrated, linear distributions among Clusters 3, 5, 7, 8 indicate different strategies of regional spatial organization and point to varying environmental adaptations in the mountainous Southern Shaanxi terrain.
Correlation analysis between environmental and morphological factors
To understand the relationship between environmental conditions and urban morphological characteristics, a comprehensive correlation analysis was conducted using both Spearman and Pearson correlation coefficients. The analysis revealed complex interactions between environmental and morphological parameters, with varying degrees of significance. Figure 9 presents a correlation matrix that visualizes the complex interactions between environmental and morphological parameters, revealing varying degrees of significance across different factor pairs.
Among environmental factors, slope demonstrates the most significant correlations with morphological characteristics. It shows strong negative correlations with several size-related indicators: area (r = − 0.39, p < 0.001), perimeter (r = − 0.37, p < 0.001), length of longest axis (r = − 0.34, p < 0.001), and number of buildings (r = − 0.40, p < 0.001). This suggests that steeper terrain significantly constrains urban expansion and development scale. Interestingly, slope shows a positive correlation with roundness (r = 0.14, p < 0.01) and aspect ratio (r = 0.15, p < 0.01), indicating that towns in steeper areas tend to develop more compact and elongated forms. NDVI exhibits strong negative correlations with most morphological indicators, particularly with total building area (r = − 0.50, p < 0.001) and number of buildings (r = − 0.49, p < 0.001). This inverse relationship suggests that areas with higher vegetation coverage tend to have more limited urban development. However, NDVI shows a positive correlation with aspect ratio (r = 0.20, p < 0.001), indicating that towns in heavily vegetated areas tend to develop in more elongated patterns. Land use patterns show significant positive correlations with size-related morphological indicators: area (r = 0.42, p < 0.001), number of buildings (r = 0.43, p < 0.001), and total building area (r = 0.43, p < 0.001). This suggests that artificial surfaces are associated with larger and more developed urban forms. The positive correlation with fractal index (r = 0.15, p < 0.01) indicates more complex urban boundaries in developed areas. Elevation shows relatively weak but significant negative correlations with most morphological indicators, including area (r = − 0.14, p < 0.01), total building area (r = − 0.12, p < 0.05), and fractal index (r = − 0.15, p < 0.01). This suggests that higher elevations generally constrain urban development, though the relationships are not as strong as those with slope. Distance to rivers shows moderate positive correlations with size-related indicators: area (r = 0.32, p < 0.001), number of buildings (r = 0.33, p < 0.001), and total building area (r = 0.30, p < 0.001). This unexpected relationship might suggest that recent urban development has not been as constrained by proximity to water resources as historical patterns might suggest. Among the morphological indicators themselves, strong correlations exist between size-related measures (area, perimeter, number of buildings, and total building area), with correlation coefficients above 0.95 (p < 0.001). The fractal index shows significant positive correlations with roundness (r = 0.51, p < 0.001) but negative correlations with aspect ratio (r = − 0.60, p < 0.001), suggesting that more complex urban boundaries are associated with more compact rather than elongated forms. These correlation patterns reveal the complex interplay between environmental conditions and urban morphological development in the mountainous region. Topographic factors (slope and elevation) and vegetation coverage (NDVI) appear to be the most influential environmental constraints on urban form, while other environmental factors show more nuanced or limited relationships with morphological characteristics.
A heatmap visualization approach was employed to examine the relationship between environmental clusters and morphological patterns. The heatmap (Fig. 10) illustrates the distribution proportions of morphological clusters within each environmental cluster type. The heatmap analysis reveals significant associations between environmental conditions and urban morphological development patterns. Environmental Cluster 6 (characterized by high slope areas) demonstrates a strong preference for Morphological Cluster 3, with 60% of towns exhibiting compact development patterns, indicating that challenging terrain conditions predominantly favor concentrated urban forms. The analysis identified that Environmental Cluster 3 (balanced environmental conditions) exhibits the most diverse distribution across morphological types, being the only cluster supporting all eight morphological clusters, with a notable 28.2% presence in Morphological Cluster 5. This diversity pattern indicates that balanced environmental conditions facilitate greater flexibility in urban form development. Environmental Cluster 4 (low elevation and slope) demonstrates an even distribution (26.9%) across Morphological Clusters 2, 3, and 4, suggesting that favorable topographical conditions support multiple urban form types. Environmental Clusters 1 and 2 (moderate environmental conditions) exhibit a predominant preference for Morphological Cluster 3 (44% and 45.1% respectively), indicating that moderate environmental conditions tend to favor compact and regular urban forms. These findings elucidate the significant influence of environmental conditions on urban morphological development and provide critical insights for sustainable urban planning in mountainous regions. The analysis particularly emphasizes that in extreme environmental conditions (Environmental Clusters 6), the selection of urban forms is substantially constrained, underscoring the necessity of adapting urban development strategies to local environmental conditions.
Discussion
This study presents a comprehensive analysis of the relationships between environmental factors and urban morphology in small towns of the Qinba Mountains in Southern Shaanxi. The results reveal complex patterns of environmental-morphological interactions and adaptation strategies that characterize mountain town development. The identification of six distinct environmental clusters demonstrates the significant environmental heterogeneity in the Qinba mountainous region. This heterogeneity aligns with findings from similar mountainous regions, where environmental diversity has been shown to influence settlement patterns significantly58 . The dominance of Cluster 4 (26.3% of towns) and Cluster 1 (25.7% of towns) in areas with moderate environmental conditions suggests that small towns tend to develop in locations that offer a balance between environmental constraints and development opportunities. This pattern supports previous research indicating that moderate environmental conditions often facilitate optimal urban development in mountainous regions59. The classification of eight morphological clusters reveals diverse adaptation strategies employed by small towns in response to environmental conditions. The predominance of compact forms (Cluster 3, 145 towns) and regular development patterns (Cluster 2, 85 towns) suggests these morphologies are most suitable for mountain environments. The high proportion of towns exhibiting these patterns indicates successful adaptation to local environmental conditions while maintaining development efficiency.
The correlation analysis between environmental and morphological factors reveals several key patterns that advance our understanding of mountain town development. Particularly noteworthy is the relationship between town morphology and topographical features. The correlation analysis reveals that slope has the strongest influence on urban form (r = − 0.39 with area, p < 0.001). The positive correlation between slope and both roundness (r = 0.14) and aspect ratio (r = 0.15) indicates that steeper terrain promotes more compact and elongated urban forms, a finding that has significant implications for mountain town planning. The strong negative correlation between NDVI and urban size metrics (r = − 0.50 with total building area) indicates a clear trade-off between vegetation preservation and urban development. This relationship highlights the need for careful balance between development needs and ecological preservation in mountain regions.
Based on these findings, several key planning strategies emerge for sustainable small town development in mountainous regions. Planning policies should prioritize adaptive compact development that efficiently utilizes limited buildable land while respecting topographic constraints, as demonstrated by the success of compact urban forms across multiple clusters in our study area. Environmental sensitivity must be central to development planning, with particular attention paid to slope gradients and vegetation coverage. The MST analysis further indicates that planning should adopt a network-based approach, focusing on developing integrated systems of small towns along natural corridors rather than pursuing isolated development projects. This approach can enhance regional connectivity while respecting environmental constraints60. Development scale should be carefully matched to local environmental carrying capacity, with larger urban developments restricted to areas with favorable environmental conditions, as evidenced by the clear relationship between environmental parameters and town size in our analysis.
The identified morphological clusters provide the basis for differentiated development strategies tailored to specific urban form characteristics. For Cluster 8 (large-scale developments), optimizing ecological footprint through green infrastructure integration and mixed-use development approaches is essential to balance urban functionality with environmental protection. Cluster 6 (regular-expansive forms) should adopt stepped building designs that adapt to terrain constraints while minimizing earthwork requirements, reducing both construction costs and environmental impact. Cluster 3 (compact forms) should maintain existing density levels while enhancing public space quality and accessibility, ensuring that compactness does not compromise livability. Cluster 1 (linear forms) should strengthen development along transportation corridors while avoiding lateral expansion that could compromise agricultural land or natural habitats. These cluster-specific strategies ensure that planning interventions align with existing morphological characteristics while promoting sustainable development principles.
This study has several limitations that suggest directions for future research. First, while the current analysis focuses on static environmental and morphological characteristics, future studies could incorporate temporal dynamics to understand how these relationships evolve over time. Second, the analysis could be enhanced by including socio-economic factors that might influence urban form adaptation61. Future research could expand this framework to other mountainous regions to test its generalizability. Additionally, more detailed analysis of the relationship between urban form and environmental performance metrics could provide valuable insights for sustainable urban design. The integration of climate change scenarios into the analysis framework would also be valuable for long-term planning considerations. These findings and recommendations contribute to a more nuanced understanding of urban development in mountainous regions and provide practical guidance for planners and policymakers working to promote sustainable urban development in environmentally sensitive areas.
Conclusions
This study performed a comprehensive analysis of the urban morphology of small towns in the Qinba Mountain Area of Southern Shaanxi by innovatively integrating Earth observation data and advanced morphometric methods. Through the application of the U-Net3+ deep learning model, the study successfully extracted 123,992 building footprints, enabling precise boundary delineation of small towns despite the complex topographical conditions of the mountainous region. The integration of SOM clustering analysis and MST spatial pattern analysis revealed distinct patterns in both environmental conditions and urban morphological characteristics, demonstrating the complex interplay between natural settings and urban development patterns. The environmental clustering analysis revealed six distinct environmental types, demonstrating the significant heterogeneity of environmental conditions in the mountain region. The distribution of towns across these clusters suggests that moderate environmental conditions are most conducive to small town development, with approximately 52% of towns concentrated in areas offering balanced environmental characteristics. The MST analysis further revealed how these environmental clusters manifest in spatial patterns, from concentrated distributions in favorable environments to dendritic patterns in more challenging terrains. The morphological analysis identified eight distinct urban form types, ranging from compact forms to expansive patterns. The dominance of compact forms in Cluster 3 (145 towns) and balanced development patterns in Cluster 2 (85 towns) suggests these morphologies are particularly well-suited to mountain environments. The correlation analysis between environmental and morphological factors revealed slope as the most influential environmental factor, showing strong negative correlations with urban size metrics but positive correlations with compactness indicators. This finding highlights how topographical constraints fundamentally shape urban development patterns in mountainous regions. Our analysis revealed complex relationships between environmental conditions and urban morphology, with strong evidence that small towns in the Qinba Mountains have developed diverse adaptation strategies to local environmental contexts. The predominance of compact and moderate-sized development forms indicates successful adaptation to environmental constraints, while the rarity of large-scale developments suggests natural limitations on urban expansion in mountainous terrain. The spatial distribution patterns, particularly the dendritic structures following valley systems, demonstrate how small towns effectively utilize natural corridors for development while maintaining regional connectivity. This study investigates and lays a foundation for further research in the development of mountain towns, providing valuable insights into urban planners and policymakers. The patterns identified and the relationships between environmental factors and urban morphology provide a basis from which scientifically targeted planning strategies can be developed to promote sustainable urban development while protecting the unique ecological characteristics of mountainous regions. This balanced approach is required to satisfy the pre-conditions which will provide long-term sustainability for small towns in environmentally sensitive mountain areas. These findings bring out the place-specificity of development strategies within mountainous regions, where the natural environment most constrains and shapes urban morphology. The identified morphological clusters provide a scientific basis for developing tailor-made planning strategies that promote sustainable urban development in mountainous regions.
Data availability
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
References
Kammer-Kerwick, M., Takasaki, K. & Kellison, J. Asset-based, sustainable local economic development: Using community participation to improve quality of life across rural, small-town, and urban communities. Appl. Res. Qual. Life 17, 3023–3047. https://doi.org/10.1007/s11482-022-10051-1 (2022).
Gu, C., Li, Y. & Han, S. S. Development and transition of small towns in rural China. Habitat Int. 50, 110–119. https://doi.org/10.1016/j.habitatint.2015.08.017 (2015).
Wang, X., Liu, S., Sykes, O. & Wang, C. Characteristic development model: A transformation for the sustainable development of small towns in China. Sustainability 11, 3753. https://doi.org/10.3390/su11133753 (2019).
Vaishar, A. & Zapletalov, J. Small towns as centres of rural micro-regions. Eur. Countrys. 1, 70–81. https://doi.org/10.2478/v10091-009-0006-4 (2009).
Nathan, H. Sustainability in Indian Cities: A Developing Country Perspective. Sustainable Development Goals Series (Springer, 2020).
Zhao, X. & Wu, Z. Unveiling the urban morphology of small towns in the eastern Ginba mountains: Integrating earth observation and morphometric analysis. Buildings 14, 2015. https://doi.org/10.3390/buildings14072015 (2024).
Noronha, T. & Vaz, E. The small and medium towns in the peripheries. Habitat Int. 45, 147–155. https://doi.org/10.1016/j.habitatint.2014.06.025 (2015).
Bole, D., Nared, J. & Zorn, M. Small Urban Centers in the Alps and Their Development Issues (Springer, 2016).
Zang, Y., Yang, Y. & Liu, Y. Understanding rural system with a social-ecological framework: Evaluating sustainability of rural evolution in Jiangsu Province, South China. J. Rural. Stud. 86, 171–180. https://doi.org/10.1016/j.jrurstud.2021.05.008 (2021).
Li, Y., Liu, C. & Zhang, H. Evaluation on the human settlements environment suitability in the three gorges reservoir area of Chongqing based on RS and GIS. J. Geog. Sci. 21, 346–358. https://doi.org/10.1007/s11442-011-0849-2 (2011).
Dai, E., Wang, Y., Ma, L., Yin, L. & Wu, Z. urban-rural gradient analysis of landscape changes around cities in mountainous regions: A case study of the Hengduan mountain region in southwest China. Sustainability 10, 1019. https://doi.org/10.3390/su10041019 (2018).
Wang, L., Wu, L. & Zhang, W. Impacts of land use change on landscape patterns in mountain human settlement: The case study of Hantai district (Shaanxi, China). J. Mt. Sci. 18, 749–763. https://doi.org/10.1007/s11629-020-6236-7 (2021).
Zuo, Q., Zhou, Y. & Liu, J. Construction and optimization strategy of an ecological network in mountainous areas: A case study in southwestern Hubei province, China. Int. J. Environ. Res. Public Health 19, 9582. https://doi.org/10.3390/ijerph19159582 (2022).
Boeing, G. Spatial information and the legibility of urban form: Big data in urban morphology. Int. J. Inf. Manag. 56, 102013. https://doi.org/10.1016/j.ijinfomgt.2019.09.009 (2021).
Rastogi, K., Bodani, P. & Sharma, S. Automatic building footprint extraction from very high-resolution imagery using deep learning techniques. Geocarto Int. 37, 1501–1513. https://doi.org/10.1080/10106049.2020.1778100 (2020).
Fleischmann, M., Romice, O. & Porta, S. Measuring urban form: Overcoming terminological inconsistencies for a quantitative and comprehensive morphologic analysis of cities. Environ. Plan. B Urban Anal. City Sci. 48, 2133–2150. https://doi.org/10.1177/2399808320910444 (2021).
Abdollahpour, S., Qi, M., Le, H. & Hankey, S. Urban spatial structure and air quality in the united states: Evidence from a longitudinal approach. Environ. Int. 190, 108871. https://doi.org/10.1016/j.envint.2024.108871 (2024).
Pinho, P. & Oliveira, V. Different approaches in the study of urban form. J. Urban. Int. Res. Placemaking Urban Sustain. 2, 103–125. https://doi.org/10.1080/17549170903083676 (2009).
Fleischmann, M., Feliciotti, A. & Kerr, W. Evolution of urban patterns: Urban morphology as an open reproducible data science. Geogr. Anal. 54, 536–558. https://doi.org/10.1111/gean.12302 (2022).
Porta, S. et al. Urban morphometrics + earth observation: An integrated approach to rich/extra-large-scale taxonomies of urban form (2022).
Shen, G. Fractal dimension and fractal growth of urbanized areas. Int. J. Geogr. Inf. Sci. 16, 419–437. https://doi.org/10.1080/13658810210137013 (2002).
De Keersmaecker, M.-L., Frankhauser, P. & Thomas, I. Using fractal dimensions for characterizing intra-urban diversity: The example of brussels. Geogr. Anal. 35, 310–328. https://doi.org/10.1111/j.1538-4632.2003.tb01117.x (2003).
Azhdari, A., Soltani, A. & Alidadi, M. Urban morphology and landscape structure effect on land surface temperature: Evidence from Shiraz, a semi-arid city. Sustain. Cities Soc. 41, 853–864. https://doi.org/10.1016/j.scs.2018.06.034 (2018).
Kohonen, T. The self-organizing map. Proc. IEEE 78, 1464–1480. https://doi.org/10.1109/5.58325 (1990).
Wu, X. & Tang, S. Comprehensive evaluation of ecological vulnerability based on the AHP-CV method and SOM model: A case study of Badong County, China. Ecol. Indic. 137, 108758. https://doi.org/10.1016/j.ecolind.2022.108758 (2022).
Gorricha, J. & Lobo, V. Improvements on the visualization of clusters in geo-referenced data using self-organizing maps. Comput. Geosci. 43, 177–186. https://doi.org/10.1016/j.cageo.2011.10.008 (2012).
Wu, B. et al. An extended minimum spanning tree method for characterizing local urban patterns. Int. J. Geogr. Inf. Sci. 32, 450–475. https://doi.org/10.1080/13658816.2017.1384830 (2017).
Caruso, G., Hilal, M. & Thomas, I. Measuring urban forms from inter-building distances: Combining MST graphs with a local index of spatial association. Landsc. Urban Plan. 163, 80–89. https://doi.org/10.1016/j.landurbplan.2017.03.003 (2017).
Morales, J., Flacke, J., Morales, J. & Zevenbergen, J. Mapping urban accessibility in data scarce contexts using space syntax and location-based methods. Appl. Spat. Anal. Policy 12, 205–228. https://doi.org/10.1007/s12061-017-9239-1 (2019).
Lin, J., Wang, Y., Lin, Z. & Li, S. National-scale connectivity analysis and construction of forest networks based on graph theory: A case study of China. Ecol. Eng. 216, 107639. https://doi.org/10.1016/j.ecoleng.2025.107639 (2025).
Lin, Z. et al. Spatiotemporal variations of cropland quality and morphology under the requisition compensation balance policy. Land 14, 1235. https://doi.org/10.3390/land14061235 (2025).
Zhang, Y. & Liang, C. Analysis of annual and seasonal precipitation variation in the Ginba mountain area, China. Sci. Rep. 10, 961. https://doi.org/10.1038/s41598-020-57743-y (2020).
Li, J., Ren, Z. & Zhou, Z. Ecosystem services and their values: A case study in the Ginba mountains of China. Ecol. Res. 21, 597–604. https://doi.org/10.1007/s11284-006-0148-z (2006).
Wang, J. et al. Eo + morphometrics: Understanding cities through urban morphology at large scale. Landsc. Urban Plan. 233, 104691. https://doi.org/10.1016/j.landurbplan.2023.104691 (2023).
Golla, A., Bhattacharya, S. & Gupta, S. Assessing the discrete and systemic response of the built environment to an earthquake. Sustain. Cities Soc. 76, 103406. https://doi.org/10.1016/j.scs.2021.103406 (2022).
Vasavi, S., Somagani, H. & Yarlagadda, S. Classification of buildings from VHR satellite images using ensemble of U-Net and ResNet. Egypt. J. Remote Sens. Space Sci. 26, 937–953. https://doi.org/10.1016/j.ejrs.2023.11.008 (2023).
Kohonen, T., Makisara, K., Simula, O. & Kangas, J. Self-organizing maps: Optimization approaches. In Artificial Neural Networks 981–990 (North-Holland, 1991).
Vesanto, J. & Alhoniemi, E. Clustering of the self-organizing map. IEEE Trans. Neural Netw. 11, 586–600. https://doi.org/10.1109/72.846731 (2000).
Wehrens, R. & Buydens, L. Self- and super-organizing maps in R: The Kohonen package. J. Stat. Softw. 21, 1–19 (2007).
Caudillo-Cos, C., Montejano-Escamilla, J., Tapia-McClung, R., Avila Jimenez, F. & Barrera-Alarcon, I. Defining urban boundaries through DBSCAN and Shannon’s entropy: The case of the Mexican National Urban System. Cities 149, 104969 (2024).
Gillies, S. The shapely user manual. figshare (2013).
Bellock, K. Alpha shape toolbox. Version v1.3.1 (2021).
Ai, T., Zhang, R., Zhou, H. & Pei, J. Box-counting methods to directly estimate the fractal dimension of a rock surface. Appl. Surf. Sci. 314, 610–621. https://doi.org/10.1016/j.apsusc.2014.06.152 (2014).
Davies, D. & Bouldin, D. A cluster separation measure. IEEE Trans. Pattern Anal. Mach. Intell. PAMI–1, 224–227. https://doi.org/10.1109/TPAMI.1979.4766909 (1979).
Rousseeuw, P. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 20, 53–65. https://doi.org/10.1016/0377-0427(87)90125-7 (1987).
Singh, A., Mittal, S., Malhotra, P. & Srivastava, Y. Clustering evaluation by Davies-Bouldin Index (DBI) in cereal data using k-means. In Proceedings of the 2020 Fourth International Conference on Computing Methodologies and Communication (ICCMC) 306–310. https://doi.org/10.1109/ICCMC48092.2020.ICCMC-00057 (2020).
Tambunan, H. et al. Electrical peak load clustering analysis using k-means algorithm and silhouette coefficient. In Proceedings of the 2020 International Conference on Technology and Policy in Energy and Electric Power (ICT-PEP) 258–262. https://doi.org/10.1109/ICT-PEP50916.2020.9249773 (2020).
Ros, F., Riad, R. & Guillaume, S. PDBI: A partitioning Davies-Bouldin index for clustering evaluation. Neurocomputing 528, 178–199. https://doi.org/10.1016/j.neucom.2023.01.043 (2023).
Dong, C. et al. Enhancing ecological connectivity in the Qilian Mountains: Integrating GCA and optimized MST models for ecological corridor construction. Ecol. Indic. 166, 112525. https://doi.org/10.1016/j.ecolind.2024.112525 (2024).
Philippi, D., Rothaus, K. & Castelli, M. A vision transformer architecture for the automated segmentation of retinal lesions in spectral domain optical coherence tomography images. Sci. Rep. 13, 517. https://doi.org/10.1038/s41598-023-27616-1 (2023).
Alam, T., Shia, W.-C., Hsu, F.-R. & Hassan, T. Improving breast cancer detection and diagnosis through semantic segmentation using the unet3+ deep learning framework. Biomedicines 11, 1536. https://doi.org/10.3390/biomedicines11061536 (2023).
Lowry, J. & Lowry, M. Comparing spatial metrics that quantify urban form. Comput. Environ. Urban Syst. 44, 59–67. https://doi.org/10.1016/j.compenvurbsys.2013.11.005 (2014).
Tannier, C. & Thomas, I. Defining and characterizing urban boundaries: A fractal analysis of theoretical cities and Belgian cities. Comput. Environ. Urban Syst. 41, 234–248. https://doi.org/10.1016/j.compenvurbsys.2013.07.003 (2013).
Duque, J., Lozano-Gracia, N., Patino, J., Restrepo, P. & Velasquez, W. Spatiotemporal dynamics of urban growth in Latin American cities: An analysis using nighttime light imagery. Landsc. Urban Plan. 191, 103640. https://doi.org/10.1016/j.landurbplan.2019.103640 (2019).
Banerjee, S. et al. Analysing impacts of urban morphological variables and density on outdoor microclimate for tropical cities: A review and a framework proposal for future research directions. Build. Environ. 225, 109646. https://doi.org/10.1016/j.buildenv.2022.109646 (2022).
Guo, F., Schlink, U., Wu, W. & Mohamdeen, A. Differences in urban morphology between 77 cities in China and Europe. Remote Sens. 14, 5462. https://doi.org/10.3390/rs14215462 (2022).
Angel, S., Arango Franco, S., Liu, Y. & Blei, A. The shape compactness of urban footprints. Prog. Plan. 139, 100429. https://doi.org/10.1016/j.progress.2018.12.001 (2020).
Chen, S., Mehmood, M., Liu, S. & Gao, Y. Spatial pattern and influencing factors of rural settlements in Ginba mountains, Shaanxi province, China. Sustainability 14, 10095. https://doi.org/10.3390/su141610095 (2022).
Yu, Z. et al. Spatial restructuring and land consolidation of urban-rural settlement in mountainous areas based on ecological niche perspective. J. Geogr. Sci. 28, 131–151. https://doi.org/10.1007/s11442-018-1464-2 (2018).
Shi, Y. et al. Evaluation of social network conservation in historical areas of mountainous towns in Chongqing, China. J. Mt. Sci. 17, 1763–1775. https://doi.org/10.1007/s11629-018-5360-0 (2020).
Okunola, S. Behavioral outcomes of culture and socio-economic status on urban residential morphology: A case study of Lagos. Procedia Soc. Behav. Sci. 50, 294–306. https://doi.org/10.1016/j.sbspro.2012.08.035 (2012).
Author information
Authors and Affiliations
Contributions
X.Z.; methodology, Z.W. and X.Z.; software, X.Z.; original draft preparation, X.Z.; review and editing, Z.W. and X.Z.; supervision, Z.W.; investigation, X.Z.; project administration, Z.W. All authors have read and agreed to the published version of the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Zhao, X., Wu, Z. Uncovering urban morphology and environmental interactions of small towns using self organizing maps in Qinba Mountains of Southern Shaanxi China. Sci Rep 15, 38679 (2025). https://doi.org/10.1038/s41598-025-22214-9
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-025-22214-9











