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, each transit point computed from a respective time-stamped GPS sample point, wherein computing the transit points includes computing a connectivity among all point transit clusters and clustering transit points located in similar network locations of the trajectory graph, whereby the centroids of transit point clusters form a node for the transit graph; grouping the transit points into individual transit clusters, and constructing a temporal transit graph based on the transit clusters to define an aggregated trajectory of traffic patterns, the transit graph capturing the shortest paths among the transit points; determining a common route of at least two vehicles whose GPS sampling intervals are different based on performing a trajectory alignment of the transit points with respect to a road network; when two consecutive GPS points do not locate on the same or adjacent road segments, connecting the consecutive GPS points by the shortest path and performing a temporal interpolation to generate modified time stamps corresponding to the connected GPS points; and indexing and storing the transit graph in a spatial-temporal database for online analytic processing, the online analytic processing comprising receiving spatial-temporal queries on the transit graph via a user interface, wherein the GPS sample points that are collected from GPS logs of a plurality of vehicles in a street network table to define traffic patterns.