An Efficient Algorithm for Spatio-Temporal Moving Pattern Extraction