## 1 Introduction
Currently, employing clustering algorithms for data analysis and processing has emerged as a pivotal technical field. [PERSON] et al., employed the DBSCAN algorithm to cluster pick-up and drop-off locations, establishing a maximum entropy model to evaluate urban traffic distribution [25]. [PERSON] et al. [26] introduced a density-based spatial clustering algorithm named DBSCAN+, which efficiently segments and extracts the highest-density clusters from large-scale data. This addresses the issues of slow clustering speed and the inability to identify suitable cluster centers for taxi trajectory data under traditional density algorithms. However, obstacles like buildings, lakes, and mountains are commonly present in natural geographic spaces, impacting cluster results and preventing an accurate reflection of data characteristics. Therefore, traditional spatial clustering algorithms are unsuitable for real-world spatial scenarios with obstacle constraints [27]. With the continuous evolution of information technology, pursuing more rational and practical clustering outcomes has led to the burgeoning focus on spatial clustering algorithms that navigate around obstacles, becoming a prominent area of research [28]. The COD-CLARANS algorithm [PERSON] et al. [29] proposed is an early example of clustering algorithms grounded in obstacle constraints. It builds upon the partition-based CLARANS [30] clustering algorithm and introduces obstacle distance, employing pruning strategies to achieve clustering with obstructed data. However, the overall efficiency of this algorithm is relatively low. [PERSON] et al. [31] introduced the AUTOCLUST+ algorithm based on graph-theoretical Delaunay triangulation. [PERSON] et al. [32], building upon the foundation of the traditional density-based clustering algorithm DBSCAN [33], introduced an obstacle model and proposed a novel algorithm named DBCLuC, which transforms obstacle models into a collection of polygons. The obstacle-constrained clustering algorithm based on intelligent optimization [34; 35] is formed by integrating the optimization models from intelligent optimization algorithms with the clustering process. [PERSON] [36] introduced the QKSCO algorithm for obstacle-constrained spatial clustering, which integrates QPSO and K-medoids. The precision of clustering outcomes is elevated by applying QPSO's rapid global convergence to the separation process of global clustering. The studies mentioned above have thoroughly considered the impact of real-world spatial obstacles on data clustering results. They have also introduced various improvements and adaptations to traditional clustering algorithms, which have, to some extent, enhanced the accuracy of clustering outcomes, offering fresh perspectives for subsequent research in related clustering domains. However, the generality of the clustering algorithms proposed in these studies is low, and they are only partially suitable for the transportation industry. Moreover, studies that effectively present the significant effects of clustering through visualization are scarce. Therefore, this study introduces a density-based partitioning clustering algorithm incorporating road coefficients to circumvent architectural obstacles. This algorithm is designed for handling massive trajectory data and can effectively enhance the precision of clustering results by filtering out a substantial amount of invalid data. It demonstrates strong applicability in urban transportation trajectory data. Additionally, this study introduces a heatmap visualization method that combines clustering algorithms. This method not only intuitively reflects the natural distribution of data after avoiding buildings but also highlights the rapid visualization effect of the data. This paper proposes a trajectory data storage model based on the HBase distributed database as its foundation. This model constructs integer encoding based on fundamental units of \"minutes\", \"hours\", and \"days\", achieving the storage of trajectory data across multi-level time scales.