A comparative analysis of trajectory similarity measures