Accurate ship track prediction plays a pivotal role in maritime operations, enabling proactive decision-making, enhancing safety, and optimizing vessel routing. We propose ship trajectory prediction - a threefold technique for facilitating accurate predictions, which involves clustering historical AIS trajectories into maritime de facto routes, classifying new trajectory to one of these routes, and conducting predictions along the identified route. To overcome the challenges of capturing the latent structure in high-dimensional and heterogeneous space imposed by AIS data, we introduce a new similarity technique that automatically determines the number of clusters. Furthermore, we introduce a method to automatically annotate the feature space, enhancing the efficiency of data analysis tasks like clustering. This not only improves performance but also ensures transparency, allowing for effective performance evaluation. Our approach demonstrates an accuracy of over 88% and an accuracy of 78% in predicting routes for tanker vessels.