AbstractApplying the electronic route map is a cornerstone for improving the management and operational efficiency of transportation systems. However, the practice of electronic route map designed specifically for the transit system is relatively scarce, because buses are still running and navigating in a complex environment. One major reason is that the online electronic map often fails to match the real-world bus network due to delayed updating of database. To address this issue, this paper proposes a method to fit the bus route trajectory curve based on global positioning system (GPS) data. A complete data processing methodology is established, including GPS trajectory similarity comparison, similar trajectories merging, and simplification of merged bus route trajectories. This paper innovatively proposes a merging algorithm named dynamic time warping–median-based fusion (DTW-MF), which aims to minimize the bias caused by outliers in GPS fusion. Additionally, the Douglas-Peucker algorithm is used for trajectory simplification, which smoothens the bus route trajectories and makes it easier to understand. A case study is conducted in a real-world bus system with 93 bus routes in Hangzhou, China. The results show that the proposed DTW-MF method outperforms the other two commonly used methods, namely DTW barycenter averaging (DBA) and prioritized shape averaging (PSA) algorithms, both in merging performance and computational efficiency.