The complexity and diversity of ship traffic conditions have burdened maritime safety because of the increasing maritime transportation, especially in the waters around busy ports. A shipping route modelling approach around port areas is presented for maritime traffic identification and monitoring in areas characterized by the confluence of routes approaching the port entrance. In this study, a clustering-based approach is adopted, which involves identifying ship trajectories of different motion patterns corresponding to in-port and out-port ship routes based on Principal Component Analysis and K-mean clustering algorithms. Subsequently, the route centrelines are estimated for each ship route using Soft Dynamic Time Wrapping barycentre averaging algorithm from the near centre trajectory defined by Dynamic Time Wrapping. Afterwards, the route boundaries are generated with the optimal distribution of conjunction points at observation lines along the centrelines. Finally, a case study of ship traffic around Leixões port on the Portugal coast indicates that the proposed framework is practical and the ship route model facilitates the prudent selection of shipping routes for vessels, ensuring maritime traffic safety and promoting effective maritime supervision.