# The Big Picture: An Improved Method for Mapping Shipping Activities
## 2 Background
### Spatio-Temporal Data and the Automatic Identification System (AIS)
#### 2.1.2 Incomplete Trajectories  
Despite the high rate of transmission of AIS messages, sparse trajectories often occur in datasets. Reconstructing the trajectories during large gaps is no simple task. Most current approaches to density map generation will simply remove interpolate trajectories with large missing parts [30; 31]. Several works have proposed strategies for dealing with the imperfections of AIS data and specifically for completing or filling the gaps in trajectories. The majority of these works assume that at least in theory, the trajectory of a ship can be approximated as a straight line for a short time interval. Therefore, linear interpolation is the most widely used gap-filling method [32; 33; 34; 35]. According to this method, the positions of the ship between two points are calculated by interpolating their coordinates (latitude and longitude) according to the desired timestamp. However, this method is only suitable for small forecasting windows (e.g., several minutes), high frequency data and in situations when the vessel is expected to follow uniform linear motion. Additional interpolation methods have been proposed, such as polynomial, cubic spline interpolation, Lagrange and Hermite interpolation methods, which take into consideration additional features such as direction, heading and speed to reconstruct trajectories with curves [34; 36]. Unfortunately, the above methods do not take into account the environment or prior information regarding a travel area. They also show degraded accuracy in scenarios where ships conduct maneuvers often (e.g., rivers). Several works have attempted to combine the methods above with the ships' navigational status to improve results. [PERSON] et al. proposed a trajectory reconstruction approach considering the navigation states, namely hotelling, maneuvering, and normal-speed sailing [37]. In this work, both linear interpolation and cubic spline interpolation for straight and curve sub-trajectories, respectively, are applied to reconstruct a new smooth trajectory. The majority of these approaches remain geometry-based approaches, unfortunately not making use of the kinematic information of the ship or historical information of the area; thus, the accuracy of the results is limited [38]. Recently, advances in machine learning have led to numerous works with applications in transportation [39], with a large portion being about processing vessel trajectories. For example, in [20], CNNs are utilized to reconstruct AIS trajectories. Experimental results show that the proposed method is capable of higher accuracy than the cubic spline interpolation baseline method, especially when the trajectories are curved and have a high loss rate. Unfortunately, the test results cover only a small geographical area. In [30], a Long Short-Term Memory (LSTM)-based supervised learning method is used to reconstruct the vessel trajectories, achieving good results in short-term forecasts, without taking into account the environmental factors of ship sailing. Similarly, [40] uses an LSTM-based architecture that addresses some of the AIS-related issues, giving predictions to horizons up to 1 h in the future. Authors in [41] apply a deep learning method based on Bi-directional Long Short-Term Memory Recurrent Neural Networks (BLSTM-RNNs) for trajectory restoration. The method demonstrates higher accuracy than linear interpolation methods in complex waterways such as the Yangtze River, but the deep learning approach comes with a higher computational cost. In [42] a novel sequence-to-sequence vessel trajectory prediction model based on encoder-decoder recurrent neural networks (RNNs) that are trained on historical trajectory data to predict future trajectory samples given previous observations is proposed. The suggested method showcases superior accuracy than baseline methods but relies heavily upon the historical data of paths belonging to the same motion pattern of the test trajectory, i.e., a large and representative sample of data from the domain.