The automatic identification system (AIS) provides a massive database for ocean science. The original AIS data are redundant. Direct use will cause a waste of data storage space and computation costs; hence, data compression must be performed. The Douglas-Peucker algorithm (DP) is an effective trajectory compression algorithm that can well preserve the spatial characteristics of a trajectory but has the following shortcomings: first, it has poor track recovery when compressing multi-turn routes; second, it does not consider the ship speed and heading; and third, it may have the wrong result of the compressed trajectory crossing the obstacle. To address these situations, this study proposes a multi-objective peak DP algorithm (MPDP) that adopts a peak sampling strategy, considers three optimization objectives (spatial characteristics, heading and speed) of trajectory and adds an obstacle detection mechanism to realize a compression algorithm more suitable for curved trajectories. The classical DP algorithm is compared with the MPDP algorithm by simulating trajectory and real trajectory experiments. The results show that the MPDP algorithm optimizes the length loss rate, simultaneous Euclidean distance, and average deviations of the speed and the heading while maintaining a high compression rate similar to that of the DP algorithm. Moreover, it can also successfully avoid obstacles. The optimization effect is most obvious for the multi-turn or hovering trajectory. The optimization rate of length loss, synchronous Euclidean distance, and average deviation of the heading can reach 40%.INDEX TERMS AIS data, Douglas-Peucker algorithm (DP), multi-objective peak Douglas-Peucker algorithm (MPDP), trajectory compression.