## 4 Discussion
Some scholars have also explored suitable grid scales for specific study areas, proposing that a finer grid scale is not always necessary. Different regions and spatialization methods require tailored scales. For instance, [PERSON] et al. [51] evaluated grid scale suitability in terms of location, numerical accuracy, and spatial relationships, determining that 40 m and 50 m grids were optimal fortheir study area. [PERSON] et al. (2018) suggested that a 200 m grid scale is appropriate for population spatialization at the town level in their study area. This study employed accuracy evaluation indicators and landscape ecology indices to conduct a suitability analysis of the spatialized population estimation results for Shanghai at grid scales of 100 m, 200 m, 300 m, and 500 m. The findings indicate that the 100 m grid scale achieves the highest accuracy and the largest SDPD value. However, due to the homogeneity of population density distribution patterns or the limited range of scale variations across the four grid resolutions, the SWDI and SIDI values exhibit minimal differences, reflecting similar levels of spatial heterogeneity in population distribution. Nevertheless, as the grid scale increases while maintaining the overall spatial distribution similarity, localized population density patterns tend to become more dispersed. Considering these factors, the 100 m grid scale was selected as the most suitable resolution. Notably, the spatial aggregation effects across different grid scales may lead to variations in population density estimates and accuracy metrics. Finer spatial resolutions (e.g., 30 m grids) better capture the microscale characteristics of an intra-urban population distribution, though they increase computational complexity in estimation modeling and may introduce data noise. Conversely, coarser resolutions (e.g., 1 km grids) improve computational efficiency for the estimation model while potentially obscuring critical population agglomeration patterns. This tradeoff is particularly relevant for megacities like Shanghai, where significant disparities exist between central urban and suburban population distributions. An optimal solution may involve either identifying an appropriate fixed scale or adopting differentiated resolutions for distinct functional zones. This comprehensive analysis suggests that optimal grid scale selection for population spatialization should integrate multiple considerations, including spatial distribution characteristics, error analyses, accuracy verification, and the landscape ecology of estimation results ([PERSON] et al., 2018). The XGBoost-SHAP method proposed in this study achieves a complementary integration of two approaches in population spatialization research, providing a solution that combines estimation capability and interpretability with strong universality. For data-rich study areas, the model can fully leverage multi-source features (e.g., remote sensing and POI data) to achieve accurate predictions while identifying key influencing factors through SHAP values. In data-scar  
Figure 8: Spatial distribution of DN and POI kernel density. available data (e.g., nighttime light and road network information). The model can effectively simulate spatial variations in population density across different city types and quantify spatial heterogeneity impacts, providing valuable references for urban planning departments to formulate more precise land development strategies and optimize infrastructure allocation. However, several limitations should be noted. First, when processing large datasets, the XGBoost model requires the continuous training and adjustment of optimization parameters. Although we employed GridSearchCV for automatic parameter optimization, the tuning process remains time consuming prior to model implementation. Moreover, the impact of spatial autocorrelation in the data was not considered. Therefore, subsequent research should explore more optimized approaches for model parameter selection or evaluation methods.