Unveiling the complexity of human mobility by querying and mining massive trajectory data