Advanced techniques in trajectory data analysis for anomaly detection and map construction