A pattern-growth approach for mining trajectories