## 4 Basic Concepts and Definitions  
GPS coordinates represent latitude and longitude, which are angles that uniquely define points on a sphere.  
Consider the equatorial plane, i.e., the plane containing the equator, which passes also through the center \(C\) of the sphere. The latitude of a point \(P\) on the surface is the angle between this plane and the straight line passing through \(P\) and \(C\). The latitude is positive if \(P\) is above the equatorial plane, and it is negative if \(P\) is below. The longitude of a point \(P\) on the surface is the angle between the plane containing the prime meridian and the plane containing the meridian passing through \(P\). The longitude is positive if \(P\) is to east of the prime meridian, whereas it is negative if \(P\) is to west. Therefore, the longitude can range up to \(+180\) degrees.  
A trajectory \(T\) is defined as \(T=((lat_{1},long_{1},date\_time_{1});\ldots;(lat_{n},long_{n},datetime_{n}))\), where \(lat_{i}\) and \(long_{i}\) for \(i=1\ldots n\) are the latitude and longitude in decimal degrees of the GPS points of the trajectory, date_time_\(i\) is the time and the date in which every point has been registered and \(n\) is the length of the trajectory \(T\) (the total number of its points). Each trajectory in the GeoLife database is identified by a trajectory ID and by the user ID who traveled it.  
Figure 1: GeoLife trajectories in Beijing metropolitan area.  
A trajectory log is a set of geographic locations corresponding to a user in motion, ordered by time, from the moment he starts recording his journey until the moment he stops. It can also contain additional information such as transportation mode labels: driving, taking a bus, riding a bike or walking.  
The objective of this paper is to propose a practical method to detect, in a large database of trajectories \(T\), all connected paths \(P_{j}=\{(lat_{1},long_{1}),\ldots,(lat_{n},long_{n})\}\) with a minimum length \(M\) (in terms of cells) that are commonly traversed by a minimum number \(S\) of different trajectories. These paths are called corridors.  
The application of brute-force corridor detection strategies is not possible in real datasets because of their computational complexity: computing the distances of all possible pairs of points for each pair of trajectories is not feasible. In order to tackle this problem, we propose a filtering strategy based on the Apriori algorithm.  
Considering previous works in the field, for computing distances between points and consequently the length of paths, we will consider the Haversine distance [18] instead of the Euclidean one. Important in navigation, the first table of Haversines was published by [PERSON] in 1805, but the term Haversine was coined in 1835 by [PERSON] [18]. Haversine formula is a particular case of the law of Haversines, that relates the sides and angles of spherical triangles. The Haversine distance [19]\(d(P_{i},P_{j})\) between two points \(P_{i}\) and \(P_{j}\), which gives the great-circle distance in kilometers between two points on a sphere, is defined as follows:  
\[d(P_{i},P_{j})=2R\arcsin\left(\sqrt{\sin^{2}\left(\frac{\varphi_{i}-\varphi_{ j}}{2}\right)+\cos(\varphi_{i})\cos(\varphi_{j})\sin^{2}\left(\frac{\lambda_{i}- \lambda_{j}}{2}\right)}\right)\]  
where \(\varphi_{i},\varphi_{j}\) are latitude of \(P_{i}\) and latitude of \(P_{j}\) (in radians), \(\lambda_{i},\lambda_{j}\) are longitude of \(P_{i}\) and longitude of \(P_{j}\) (in radians), and \(R\) is the Earth's mean radius in kilometers.  
This formula calculates the shortest distance over the earth's surface, a measure that is called the geodesic curve, deliberately ignoring the effect of elevation differences.