1. A computer-implemented method, comprising: generating, by a processing device, a trajectory database from time-stamped global positioning system (GPS) sample points; computing transit points for each trajectory in the trajectory database; constructing a temporal transit graph, the transit graph capturing the shortest paths among the transit points; and indexing and storing the transit graph in a spatial-temporal database for online analytic processing.