Geometry of Interest (GOI): SpatioTemporal Destination Extraction and Partitioning in GPS Trajectory Data
Abstract
Nowadays large amounts of GPS trajectory data is being continuously collected by GPSenabled devices such as vehicles navigation systems and mobile phones. GPS trajectory data is useful for applications such as traffic management, location forecasting, and itinerary planning. Such applications often need to extract the timestamped Sequence of Visited Locations (SVLs) of the mobile objects. The nearest neighbor query (NNQ) is the most applied method for labeling the visited locations based on the IDs of the POIs in the process of SVL generation. NNQ in some scenarios is not accurate enough. To improve the quality of the extracted SVLs, instead of using NNQ, we label the visited locations as the IDs of the POIs which geometrically intersect with the GPS observations. Intersection operator requires the accurate geometry of the points of interest which we refer to them as the Geometries of Interest (GOIs). In some application domains (e.g. movement trajectories of animals), adequate information about the POIs and their GOIs may not be available a priori, or they may not be publicly accessible and, therefore, they need to be derived from GPS trajectory data. In this paper we propose a novel method for estimating the POIs and their GOIs, which consists of three phases: (i) extracting the geometries of the stay regions; (ii) constructing the geometry of destination regions based on the extracted stay regions; and (iii) constructing the GOIs based on the geometries of the destination regions. Using the geometric similarity to known GOIs as the major evaluation criterion, the experiments we performed using longterm GPS trajectory data show that our method outperforms the existing approaches.
Keywords:
Trajectory Data, SpatioTemporal Partitioning, Geometry of Interest, TimeValue, TimeWeighted Centroid, Destination Extraction1 Introduction
In recent years, GPS trajectory data has become abundant due to the many GPS enabled devices used on a daily basis. Mining these GPS trajectories for gathering useful information for applications has received a growing amount of attention in the recent literature. In this field, researchers have tried to derive knowledge for solving practical problems (e.g. traffic and transportation management systems (Min and Wynter, 2011), animal migration and movement monitoring (Handcock et al, 2009), location prediction (Gidófalvi and Dong, 2012), transportation mode estimation (Zheng et al, 2010), and locationbased social networks (Zheng et al, 2012)).
The applications dealing with data analysis on trajectory data often need to have access to information about the significant places which a mobile object frequently travels and stay. These significant places are referred to as the points of interest (POIs). The locations of the POIs are often used in projecting the trajectory of a mobile object into a meaningful timestamped Sequence of Visited Locations (SVL). The constructed sequences are used in various machine learning applications dealing with trajectory data (Yan et al, 2011). Therefore, the quality and accuracy of the sequence have very significant impact on the performance of the machine learning applications.
In the process of constructing the SVL of a trajectory, the applications often use Nearest Neighbor Queries (NNQ) to label each GPS observation with the ID of a POI. Fig. 1(a) presents an overview of the SVL construction process. Given a GPS trajectory (depicted with green arrows), and a set of destinations showed as polygons, the NNQ based labeling method labels each GPS observation (depicted in red points) with the ID of the nearest POI (centroid of the destination polygons) in chronological order. Although this process is quite simple and efficient, it has a few significant limitations which have a dramatic impact on the quality of the generated timestamped SVL.
As an example, consider the GPS point covered by destination . The labeling process labels the destination with the ID of the nearest destination , while in the real world, the GPS coordinate intersect with the geometry of . Therefore, the resulting SVL for the depicted trajectory using NNQ based labeling method is . This scenario frequently happens especially in environments with a high number of POIs located near each other. The problem has a dramatic impact of the quality of the constructed SVLs.
One solution to the problem is to label each of the GPS points with the ID of the POIs which intersect with them instead of performing NNQ. Fig. 1(b), shows the estimated geometry of each of the POIs which we refer to them as the Geometries of Interest (GOIs). Moreover, the GOIs must not be overlapping. Otherwise, the intersection operator would not be able to label a GPS point intersecting with more than one GOI. This solution requires having access to the real world GOIs stored in a spatial database.
The information about the GOIs might be publicly available in the spatial databases (e.g. geometries of the famous places in a city). However, in applications such as those processing the motion patterns of animals or the movement patterns of the troops in a battlefield, GOIs are not available and are required to be extracted from the trajectory data.
In this paper, we address the problem of extracting the GOIs of a mobile object, without using any information other than the GPS trajectory of the mobile object. We propose a method to partition the trajectory area, which is defined by the minimum bounding rectangle (MBR) of the trajectory, into a grid containing the GOIs of the moving object. Using the extracted GOIs and the partitioned trajectory area, we can extract the trajectory SVL by only using intersection geometric operator. The quality and accuracy of the SVL highly depend on the accuracy of the estimated GOIs.
Aiming for that, we extend the spatiotemporal partitioning techniques proposed in (Ye et al, 2009; Hariharan and Toyama, 2004). The partitioning methods have three phases. Firstly, they extract the stay regions within which a moving object has stayed for a time duration greater or equal than a predefined minimum time threshold and within a predefined Euclidean vicinity distance. Secondly, they cluster the resulting stay points (the centroids of the stay regions) to extract the destinations of the moving objects. Thirdly, they implicitly partition the trajectory area based on the coordinates of the centroids of the extracted destinations by using NNQ in the process of labeling the GPS points with the identifications of the POIs.
Our proposed method improves the baselines, in each of the three phases. Given a GPS trajectory (Fig. 2(a)), in the stay extraction phase, we propose a novel clustering method for constructing the stay regions (Fig. 2(b)). In the destination construction phase, we propose a geometry based hierarchical agglomerative clustering method for clustering (merging) the stay regions based on a geometric similarity measure and construct the geometries of the destinations (Fig. 2(c)). In the third phase, we extract the GOIs based on the geometries of the destinations and include them in the final grid which is composed of the GOIs and the cells with fixed sizes (Fig. 2(d)).
The performance of our approach is evaluated based on comparing the similarity of the derived GOIs from our approach to know geometries of the POIs. Our experimental results performed on a longterm GPS trajectories show that, in the stay extraction phase, our method outperforms the existing methods by making the higher number of valid stay regions with geometries more related to the real world POIs. In the destination extraction phase, the performance and the accuracy of our method are considerably higher than the baseline methods, considering the geometric similarity between the geometries of the extracted destination to the real world POIs. Moreover, our method is able to partition the trajectory area based on the extracted destinations resulting in a grid which guarantees the characteristics of a validly partitioned area. Using the resulting grid, we can easily generate the SVL of the mobile object by using intersection geometric operator instead of using the nearest neighbor queries or Voronoi diagrams (Aurenhammer, 1991).
1.1 Contributions
The main contributions of this research can be summarized as follows:

Proposing a novel spatiotemporal stay extraction method to extract the stay regions of a mobile object by incorporating the introduces concepts of timevalue and timeweighted centroid.

Introducing a novel agglomerative hierarchical clustering method to merge the stay regions of a mobile object based on their geometries and constructing the geometries of the destinations of the mobile object.

Developing a spatiotemporal partitioning method to partition the trajectory area of a mobile object into a grid with inhomogeneous cells containing the GOIs of the mobile object.
1.2 Paper Organisation
The remaining part of the paper proceeds as follows: In section 2, the related works focused on the partitioning of the trajectory area of mobile objects are discussed. In section 3, our problem is preliminarily defined. We introduce the concepts of timevalue and timeweighted centroid in a GPS trajectory in section 4. In section 5.1, we present our proposed stay region extraction method and compare it with the related works. In section 5.2, a novel geometric similarity based agglomerative hierarchical clustering method for merging the similar stay regions and extracting the destination geometries is discussed and compared with the related works. In section 5.3, our partitioning method which constructs a grid with inhomogeneous cells using the destination geometries constructed in the previous phase is introduced. In section 6, we analyze the computational complexity of our method compared to the baselines. In section 7, the quality of our method compared to the related works is evaluated compared to the previous works. Finally, in section 8, the introduced method is summarized, and the achieved results and the future works are discussed.
2 Related Works
In recent years, various works have considered trajectory data preprocessing, indexing, storage, and analysis (Zheng and Zhou, 2011). These trajectories could be collected by social networks (Cho et al, 2011), sensor networks (Ji and Zha, 2004), RFIDs (Kourogi et al, 2006), WIFI (Song et al, 2006), simulators (Mousavi et al, 2007), internet of things (Macagnano et al, 2014), and cellular networks (Si et al, 2010). Among all of these kinds of trajectories, our work is focused on the trajectories collected by GPS sensors. GPS trajectories have been used in various research works in different applications (Zheng and Zhou, 2011), however, our work is a preprocessing prerequisite for all of the applications which attempt to extract the GOIs of the mobile objects.
2.1 Partitioning Approaches
In the related works aiming to partition the trajectory area of a mobile object, five approaches have been taken. Following, we discuss the approaches and their capabilities and limitations.
2.1.1 Grid with homogeneous cells
The first approach is to partition the trajectory area into a homogeneous grid to represent the regions of interest (e.g. (Xue et al, 2013)). The shape of the cells is often considered as triangular, square, rectangular, or hexagonal polygons. The main drawback of this approach is the degree of granularity of the cell. Coarse granularity leads to each of the grid cells cover a wide area which might include various POIs. The fine granularity results in the geometry of one POI to lie into different cells. These problems have significant drawbacks on the quality of the SVL extracted based on such grids.
2.1.2 Coverage Area Based
The second approach defines the POIs as the area being covered by a wireless accesspoint (Song et al, 2006) in wireless networks or the area covered by base transceiver stations (BTS) of a cellular network (Si et al, 2010). The geometries of the POIs are constructed using circular area or hexagonal polygons around the access points or the BTS. The main problem with this approach is that estimating a fixed geometry for the area covered by a wireless access point or a BTS is not straight forward due to various reasons such as signal power, noise, and obstacles, particularly in the urban areas. Also, the problems, abovementioned, related to the granularity of the grid cells remains. For example, the covered area by a BTS in a cellular network might cover a very wide area which includes various POIs, or a the covered area of an access point might not cover the whole area of a POI (covered by more than one access points).
2.1.3 Spatial Clustering Based
The third approach is to construct the geometries of the POIs based on the GPS track points in the trajectory datasets using simple spatial clustering methods without considering the temporal aspects of the GPS trajectories. Spatial clustering methods perform very similar to the classic clustering schemes such as KMeans (Ashbrook and Starner, 2003), Gaussian mixture model (GMM) (Banfield and Raftery, 1993), and DBSCAN (Zhou et al, 2004). These methods simply cluster the GPS points using measures such as the distance between GPS points or density connectivity in a twodimensional Cartesian space, without taking the third dimension time into consideration, and partition the trajectory area based on the destination geometries constructed based on that clusters.
Another class of research works which can be categorized into spatial clustering based approach are research works (Scellato et al, 2011; Li et al, 2011) which have used frequency map based spatial clustering methods for extracting significant places in the trajectory area. They partition the area into the very fine grid with equisized cells and assign a weight to each cell around each GPS point based on the duration of the GPS staying at that point. This weight assigned to each cell is computed based on the assumption that the real position of a mobile object has a normal distribution with standard deviation (Scellato et al, 2011). Then they generate a frequency map which contains peaks that give information about the region of significant places. They consider regions that are above a predefined visit frequency threshold as POIs. The main problem in the spatial clustering based partitioning approaches is the inaccuracy in the number and the geometries of the extracted POIs. They merely consider the density of the GPS track points in a neighborhood in the trajectory area as an indicator of a significant place or a POI. This assumption that the places which have more density of GPS track points are more significant for the user than the places with less density is not always true. Consider a mobile object often moves on a road network between its POIs regularly and repetitively. Obviously, during the journies between the POIs, there are some places which are being frequently visited and, therefore, have higher GPS track point density, while they are not the mobile objects POIs. For example, the conjunctions with traffic lights or the road segments with higher traffic loads often have a high density of GPS track points. These two approaches consider these kinds of places as POIs because they are not able to distinguish between POIs (with high density) and the nonPOI places with nearly the same GPS point density.
2.1.4 Speed Based
The fourth partitioning approach is taken by incorporating the speed restrictions in finding the stop and moves (E.g. (Palma et al, 2008; Bhattacharya et al, 2012)). This approach assumes the clusters with the GPS track points with lower speed are more likely to be stop points. This approach is not applicable in GPS datasets where the GPS speed is not available, or the speed is not easily computable (e.g. in trajectories with low sampling rate or with large time gaps). Moreover, there are some scenarios where defining a threshold for maximum speed is not straight forward. For example, assume a mobile object carrying a GPSenabled mobile phone. During the daily traveling activities, he might have different transportation modes (e.g. walk, bike, train, car, bus, etc.) (Zheng et al, 2010). In each of the transportation modes the speed threshold should be different since the average walking speed is different to driving. Furthermore, even if we assume the same transportation mode for the mobile object throughout the trajectory (e.g. walk), places like shopping centers, zoos, parks, campuses, and so many other POIs exist where the mobile object stays in their geometry while keeping moving (speed is greater than zero).
2.1.5 SpatioTemporal Clustering Based
The fifth approach (Ye et al, 2009; Xiao et al, 2010) employes time restricted spatiotemporal clustering in extracting the stay regions and the destinations. They extract the stay regions based on predefined spatiotemporal restrictions. Then, they merge the stay regions to construct the destinations.
They define a valid stay region (a vicinity distance with radius ) within which the mobile object has strayed (stopped or kept moving) for a time span , where , is a time span threshold. The destinations which represent the POIs are extracted by clustering (merging) the stay centroid points of the extracted stay regions using densitybased clustering methods such as OPTICS (Ye et al, 2009). This approach is highly used in research works such as (Ye et al, 2009; Xiao et al, 2010; Zheng et al, 2009, 2008; Xiao et al, 2014) conducted in Microsoft Research Asia. This approach effectively incorporates the temporal aspects of the mobile object trajectory into extracting the stay regions and as a result into the extracted destination regions. As a result, the places which the mobile object stays for a considerable time are selected, and the other places are filtered although they might have high point densities.
The research presented in (Hariharan and Toyama, 2004) has a similar approach in the extraction of the stay regions with the difference that defines the time and vicinity distance based on the diameter of the extracted stay regions. The destinations are extracted based on the predefined maximum diameter of the destinations by merging the stay regions.
The fifth approach extracts the most meaningful and valid stay and destination regions because of their specific spatiotemporal definition of a valid stay region. Therefore, among all the works discussed above, in this paper, we choose the works discussed in the fifth approach as the baseline to compare the performance of our proposed partitioning method.
3 Problem Definition
Definition 1
The trajectory of a moving object is a sequence of time stamped GPS observations (points), , where indicates the spatiotemporal data of the moving object at time . The parameters , , and , are the time stamp and Cartesian plane of the moving object respectively. in our GPS trajectories, . There are no other guarantees such as constant sampling rate.
Definition 2
The geometric similarity between a set of real GOIs and a set of estimated GOIs is defined as:
(1) 
Given a GPS trajectory , and a set of geometries of the real POIs covered by the MBR of , our objective is to propose the best (optimal) partitioning method to partition the MBR of the trajectory, which maximizes the geometric similarities between the real GOIs and their corresponding extracted GOIs .
(2) 
where is the set of different partitioning methods, e.g., diameter based, density based, geometric similarity based.
Subject to

and if then ,

.
The first constraint guarantees that the geometries of extracted partitions are mutually disjoint. The second constraint ensures that all the GPS points in the trajectory can be assigned to one and only one partition.
4 Concepts of TimeValue and TimeWeighted Centroid in Trajectory Data
In this section, we briefly introduce the concepts of timevalue and timeweighted centroid which will be used in the first phase of our partitioning method to improve the performance of the stay region extraction.
In the process of collecting GPS observations which are often done by GPS devices installed on vehicles or mobile phones, ideally, we would like to collect each GPS observation with constant sampling rate. For example, we would like to have one sample point every 10 seconds or every one minute. However, due to various reasons, it is not always applicable. GPS sensors installed on mobile phones consume a considerable amount of power. So people usually tend to keep their GPS sensor off. This fact has a dramatic impact on the quality of the collected GPS trajectories. Another reason is poor GPS coverage in places such as urban environments and particularly in indoor locations. Besides, the process of GPS data collection is often terminated by the user for long periods (e.g. in the car parks).
The time gap between two consecutive GPS observations can be short or considerably long. The long time gaps often take place when a vehicle is parked at a car park, or a mobile device is switched off. We consider the time gap between two consecutive GPS points in a trajectory as a significant influencing factor.
Definition 3
For a GPS point in the trajectory , we define the timevalue as:
(3) 
where indicates the time stamp of point .
As an example, we can consider the simple problem of computing the centroid of a set of GPS points to address the effectiveness of considering the timevalue of GPS points in trajectory data processing.
Definition 4
The centroid of a set of points , is often computed as:
(4) 
where, and are the and coordinates of point , and is the cardinality of the point set .
In Eq. 4, the values of all the GPS points are considered the same in computing the centroid. Contrary to the previous works, we incorporate the timevalue of each GPS point in computing the centroid resulting in the timeweighted centroid of the set of GPS points.
Definition 5
The timeweighted centroid () of a set of points is defined as:
(5) 
where, is the timevalue of point computed using Eg. 3, and is the cardinality of the point set .
In Eq. 5, the timevalue of each GPS point is considered as the weight or degree of significance of each point in computing the centroid. By this, we discriminate our GPS points based on the value of information they give us about the location of the mobile object. By incorporating the timevalue, the centroid will be more biased to and closer to the locations where long term stops have taken place.
5 Methodology
Our partitioning method has three phases. (i) Spatiotemporal extraction of stay regions, (ii) Constructing the destination regions based on the extracted stay regions, (iii) Partitioning the MBR of the trajectory based on the extracted destinations. Following, we discuss each phase of the method and compare them with the related works in detail.
5.1 SpatioTemporal Extraction of Stay Regions
Extraction of the stay regions of a mobile object is the first phase of our spatiotemporal partitioning method. Aiming for that as the first step We convert the GPS trajectory into a sequence of stays and moves. We define a stay as an event which has been taken place within the trajectory period of a mobile object. The event has happened in a geometric region or neighborhood called a stay region. A stay region is an area in which the mobile object spends some time . During this time, the mobile object can be either moving or stopping provided that it does not pass the boundary of the region. The boundary of the region is calculated based on the roaming distance which is the maximum distance that a moving object can stray from the centroid of the stay region. For example, if a vehicle has stopped in a car park for 8 hours starting from 9 AM to 5 PM, the event is the visit to the car park, the starting time of the event is 9 AM (arrival time) and the ending time of the event is 5 PM (departure time). Each stay has a set of GPS points (point set) which indicates the GPS observations which were collected within the stay period.
Definition 6
We define stay as , where are the identification, geometry, point set, centroid, arrival time and departure time of of , respectively. is a sub trajectory of the mobile object trajectory which is defined as a set of consecutive points , where , , and . The parameter referes to the centroid of the points in and is the the convex polygon of the point set .
The definition of a in our approach is different to the previous work (Hariharan and Toyama, 2004) and (Ye et al, 2009). In (Hariharan and Toyama, 2004), is defined as the Euclidean diameter of the coordinates of elements of a stay. This means that the diameter (the longest Euclidean distance between two points in the set) of a stay must not be greater than . They iteratively add a point to the subtrajectory and recompute the diameter of . If the diameter, remains less than after adding the new point, they keep the point in . Otherwise, they remove the point from , store , and start constructing a new stay. Ye et al., in (Ye et al, 2009) have taken the very first chronological point in each stay as the reference point and have defined as the Euclidian distance between each new point and the reference point. They do not refresh the reference point coordinate when adding a new point to the stay. While in our method, is defined as the Euclidian distance between the timeweighted centroid of the stay (reference point) to the new point which is being examined (line 11 in Alg. 1). In other words, we use the timeweighted centroid of the point set in the current stay as the reference points instead of the very first point of the stay.
The calculation of the parameter in our method is different to the previous works as well. In the previous works, the parameter is defined as , which means the time difference between the first and the last GPS observation in the stay. In our method we incorporate the timevalue of the last point () and define the as: . This means that we consider the time gap between the last point and its successor point in the trajectory to compute .
In our method (presented in Alg. 1), having a current stay, for each new GPS observation in the trajectory, if the condition and , are true, we close the current stay, store it, and make a new stay with the GPS observation as the first point in its point set. Otherwise, we add the new GPS observation to the point set of the current stay, update the timeweighted centroid of the current stay, and keep examining the next points in the trajectory. In other words by adding each point to the stay, we refresh the coordinate of the reference point as the timeweighted centroid of the points of the current stay. We assign a unique numeric identification to each stay . The parameter indicates the arrival time of stay which is the time that the moving object has arrived in the region (). Similarly, is the departure time of stay .
To calculate the geometry of the region within which the stay has taken place, we compute the convex hull of the set of points . The convex hull of a set of points is the smallest polygon that contains all of the points (Andrew, 1979). Then, we add a predefined geometric buffer around the convex hull polygon to compensate for the GPS noise. The width of the buffer is set to meters (Navstar, 2008). Fig. 3(b) shows the extracted stay regions based on the trajectory shown in Fig. 3(a).
5.2 From Stay Regions to Destination Regions
Assume a moving object visits a certain place every day (e.g. home). If we extract every stay throughout a trajectory period with a long time duration, e.g., one year or more, we would have at least 365 extracted stays with approximately the same geometry. At this stage, we need to merge the duplicated stays which represent the same destination region (e.g. car park). Aiming for that, we detect the stays that have approximately the same geometry and merge (cluster) them together resulting in a set of destinations with unique geometries and Identification.
In related works, there are two major schemes for merging the stay regions. They cluster the stay points (the centroids of the GPS points stored in each stay) such that the stay points that have close distance are clustered into the same destination. Ye et al. in (Ye et al, 2009), have used the density of neighborhood of stay points in a group as a measure of similarity in the clustering process. In other words, the stay points which have more dense neighbors (stay points with many nearby neighbors closely packed together) make a cluster (destination) and stay points that lie alone in lowdensity regions are considered as outliers. The result of running OPTICS (Ankerst et al, 1999) clustering algorithm on the set of stay points is a set of destinations (each destination is a set of stay points).
One major problem of densitybased clustering methods such as OPTICS is that it is required to define two parameters neighborhood distance (neighborhood distance) and the (minimum number of points required to form a dense region). The performance and output of the methods are strongly sensitive to the values chosen for these two parameters. For instance, in our application, if we choose a relatively big value for parameter , the densitybased clustering methods will consider lots of stay points as noise or outliers in the clustering and eliminate them because they have the lower density of neighbors than .
Hariharan et al., in (Hariharan and Toyama, 2004) have used a clustering method which finds each pair of stay points which have maximum similarity to each other and merge them together iteratively. They have defined a similarity criterion which indicates if the diameter of the resulting region of merging two stay points is less than or equal to a given threshold , these two stay points will be merged. This process continues until all similar stay points are merged.
In our method, we incorporate the geometries the stay regions in extracting the destinations instead of only considering the density or distance of the stay points. In the process of clustering, we define a criterion that helps us control our merging process in our hierarchical clustering method.
Alg. 2 presents the pseudocode of our method. We use RTree indexing method to index the geometry of each stay . Subsequently, at each step, we send a query to the RTree to find only the clusters which their geometry intersects with the current stay geometry. The result is a list of stays (). Then, we compute the most similar stay geometry in to our current stay region (). After finding the similarity of all pairs in , if , this means that there is no intersecting pair of stay regions in . If , then there is still, at least, a pair of interesting stay regions in . represents the stay region that has the highest similarity to our current stay in the second loop in Alg. 2. To decide whether we need to merge the current stay and , we compare their similarity coefficient () with . If (), we merge the two stays by adding all the GPS points in stay to and computing the new region geometry of our current stay as the geometric union of two geometries.
After merging stay region pairs, we compute the visit frequency of the resulting stay region as the sum of visit frequency of the current stay and the most similar stay region . We consider the frequency of visits to each destination as a useful criterion for selecting the significant destinations (POIs). As a result, we can decide whether we consider a cluster of stay regions (destination) as a POI or consider it as a trivial cluster (noise). The last loop in Alg. 2 removes the destinations which have been visited with the frequency less than .
We define the similarity of two geometries as the measure of similarity of two stay regions as follows:
(6) 
Fig 3 shows the destinations extracted from the a set of stay regions using different values for parameter . The higher value of leads to higher number of overlapping destination regions being extracted. Interestingly, if we set , we will have exactly all the stay regions extracted as destination regions because the probability that two stay regions have identical convex hulls (and accordingly ) is approximately zero.
5.3 From Destination Regions to Geometries of Interest (GOIs)
Having extracted the destination regions and their estimated geometries, as the final phase of our partitioning method, based on the geometries of the destination regions, we partition our trajectory area into a grid area with inhomogeneous cells such that both characteristics of a valid partitioning (discussed in section 3) are guaranteed.
Firstly, we make a grid called microgrid with equisized rectangular shaped cells with very fine granularity. The grid covers the area minimum bounding rectangle (MBR) of our GPS trajectory . Also we make a grid composed of geometries of all destination regions. We refer to this grid as destinationgrid (). Then we convert the destinationgrid () to a grid called GOIGrid () with mutualy disjoint cells. Aiming for that, for each cell , we find the cell in which maximizes the geometric similarity (Eq. 6) with .
We also defined and examined an alternative similarity metric as the Euclidean distance between the centroid of the polygon of cell in microgrid () to the centroid of the polygon of cell in destinationgrid (). We call this similarity as polygon centroid similarity (PCS).
Next, we label as a cell that represents a tiny part of the destination in the destinationgrid. We continue this process until there are no remaining unlabeled cells in which have an intersection with any of the cells in . By merging the geometries of all the cells in labeled with ID of each cell in , we make the GOIGrid (depicted in Fig 4(d)).
Since we find the most similar destination for each cell and label it to be a part of the geometry of only one destination, all GOIs in the GOIGrid are mutually disjoint, the first condition of a valid spatial partition is guaranteed. However, the grid does not cover all of the area of the MBR of the trajectory. This means that there might be a GPS observation that does not lie in the geometry of one of the GOIGrid cells. To tackle this problem, we insert all the cells , which were not already been labeled, into the GOIGrid. The resulting grid in referred to as finalgrid (Fig. 4(e)) which is composed of the GOIs of the mobile object, and the tiny cells with unique IDs. As a result, all of the area of the MBR of the trajectory are covered by either a GOI or a tiny cell in finalgrid.
Fig. 4(d) and Fig. 4(c) show the performance of both similarity metrics (GS and PCS) in the partitioning. As is seen, the resulting GOIGrid using geometric similarity resembles the DestinationGrid much better because the PCS based method is biased to the centroid of the polygon and makes the shape of the resulting polygon less similar to the corresponding cell in the destinationgrid.
6 Computational Complexity
In the stay extraction phase, in the worst case, the time complexity of our method is for track points in the trajectory. However, in practice, since the sum of the track point of the extracted stays are considerably fewer than . Note that, the inner loop in Alg. 1 deals with computing the centroids of the stay regions which depends on the number of the track points in each stay. Since a large number of track points in the trajectory are not clustered in the stays (due to restrictions of a valid stay), the sum of the track points of the stays is much lower than . Computing the diameter of the stays in the work proposed by (Hariharan and Toyama, 2004) is more complex than computing the centroid in our method, since for computing the diameter, we need to compute the distance of each point to all of the other points in the cluster with the time complexity of . Therefore, we can consider the complexity of the method, in the worst case, for track points in the trajectory. The time complexity of the method proposed by (Ye et al, 2009) is which is lower than our method since they do not refresh the coordinate of the reference point while making the stay region.
In the destination extraction phase, Zheng et al., in (Ye et al, 2009) have used OPTICS (Ankerst et al, 1999) clustering method. The time complexity of OPTICS algorithm is . The time complexity of the hierarchical clustering method provided by Hariharan et al. (Hariharan and Toyama, 2004) is in the worst case. The complexity of our method (Alg. 2) in the worst case, is . We use RTree indexing method to reduce the runtime of our method in finding the intersecting cells. The most costly part in our method is finding the degree of similarity between two geometries (Eq. 6).
In the partitioning phase, in the process of assigning each of the cells in microgrid to the cells in GOIGrid, in the worst case, the complexity of the method is , where is the number of cells in the and is the number of cells in the destinationgrid. Therefore, the granularity of has a significant impact on the runtime of our method. To increase the efficiency of the method we use RTree indexing to index the cells in the destinationgrid.
7 Experimental Results
Stay Extraction Method  Number of Extracted Stay Regions  Number of Single Sized Stay Regions 

Reference Point Based (Ye et al, 2009)  3568  0 
Diameter Based (Hariharan and Toyama, 2004)  3587  0 
TimeWeighted Centroid Based (Our Method)  4127  292 
In this section, we analyze the performance of our proposed method in comparison with the baselines. In our evaluations, we use a dataset of GPS trajectories collected in Anchorage, Alaska, USA as a part of the project FreeSim (Miller and Horowitz, 2007; Miller, 2009). The trajectory we use in this paper has been collected from a vehicle for the duration of about 42 months from 2010 to 2013 with varying sampling rate from one sample every 10 seconds to one sample every two minutes. We used ELKI machine learning library (Schubert et al, 2015), to implement the OPTICS clustering algorithm. Following we discuss the results in each of the three phases.
7.1 Stay Extraction Experimental Results
We implemented the method presented in Alg. 1 and two methods proposed in (Hariharan and Toyama, 2004), and (Ye et al, 2009). Table 1 presents a comparison of the experimental results for each stay extraction method. As it is seen, our timeweighted clustering method outperforms the other two methods in the number of extracted clusters. Moreover, our method detects and report the stay regions with the single point while the other methods simply lose the stay regions.
Destination Extraction Method  Parameters  Number of Stays  Number of Destinations 

Diameter Based (Hariharan and Toyama, 2004)  3587  304  
Diameter Based  3587  166  
Diameter Based  3587  128  
Density Based (Ye et al, 2009)  3566  456  
Density Based  3566  206  
Density Based  3566  120  
Geometric Similarity Based (Our Method)  4127  364  
Geometric Similarity Based  4127  434  
Geometric Similarity Based  4127  490 
Fig. 5 shows a visual perspective of the extracted stay regions by each of the stay region extraction methods in a selected area of the main GPS trajectory. We selected this particular region (Fig. 5(b)) because it contains clearly depicted places which indicate the car parks. We consider the car park geometries as the ground truth for our empirical observation and geometric similarity analysis. We cropped the GPS trajectory only to cover the selected area by removing all the GPS track point lie outside the geometry of the selected area.
As it is seen in Fig. 5(c), the extracted stay regions by diameter based method does not have acceptable results. Although some of the exacted stay regions intersect with the car park regions, they cover the considerable areas outside the car parks. The reference point based stay extraction method (Ye et al, 2009) depicted in Fig. 5(d) has much better performance compared to diameter based method since most of the extracted stay regions intersect with the car parks. However, on the bottom left side of the area, some irrelevant stays are evident. Fig. 5(e) shows the extracted stays using our proposed method. Although there are some minor stay regions extracted outside the car parks geometries (in places the same as those in Fig. 5(d)), the extracted stay regions are more compact and more biased to the car parks geometries.
Table 1 reports that our method has extracted 292 stay regions with only one GPS points (cluster with one member) whereas, the two baseline methods were not able to detect them. The baseline methods compute the value of as the time distance between two consecutive points because need at least two GPS points in a cluster to make a valid stay region. However, our method incorporates the timevalue of the current track point in computing . The timevalue of the current track point compensates the cases where the next point lies outside the current stay region () but the time gap is long enough (), resulting in the stay points with only one track point being detected.
Table 1 also shows that our method has extracted a considerably higher number of stay regions compared to the baselines. The reason is, there might be clusters which have members more than one but the time duration of the stay is less than without considering the timevalue. In this case, the stay is considered invalid. The duration of the same stay might become more than or equal to by considering the timevalue of the last point in the cluster. In such scenario, our method detects these clusters while the other two methods miss them.
In our method, after adding a point to point set of a stay, we update the coordinate of the reference point of the stay by computing the timeweighted centroid of the points in the stay. Therefore, the points extracted in a stay become more biased and closer to the places which longer stops have taken place. Whereas, reference point based method considers the first point of the stay as the reference point does not update it iteratively. The diameter based method (Hariharan and Toyama, 2004) does not use a centroid point or a reference point and instead uses the diameter of the stay region as the condition of a valid stay. So, it performs much less accurate than both methods.
7.2 Destination Extraction Experimental Results
In this section, we examine and compare our method with two baseline destination extraction methods using the stay regions extracted in the previous section. Table 2 shows the results for three methods. It is evident that the parameters , , and have a significant impact on the number of extracted destinations in all three methods. In the diameter based method, the larger leads to a fewer number of destinations since destinations with the larger area are constructed. The parameter has a significant impact on the number of destinations in density based method. The higher leads to a fewer number of destinations. The greater in our method leads to higher number of destinations.
Fig. 6 shows the results of the destination extraction methods on the map. As it is evident, the diameter based method (Fig. 6(a)) does not have acceptable performance in extracting the geometries of the destinations. Although the extracted destinations do cover the car parks, they have areas much larger than the car park areas, and also, they have significant overlaps. Density based method has more acceptable performance that diameter based method. However, it loses two of the car parks. Moreover, it covers places not related to the car parks. Fig. 6(c) shows the destinations extracted by our geometric similarity based method. It is evident our method has constructed destination regions with much more acceptable geometric similarity to the car parks.
GOI Extraction Method  Parameters  Degere of Geometric Similarity 

Diameter Based  0.415  
Diameter Based  0.097  
Diameter Based  0.130  
Density Based  0.310  
Density Based  0.329  
Density Based  0.314  
Geometric Similarity Based  0.623  
Geometric Similarity Based  0.628  
Geometric Similarity Based  0.650 
As it is evident in figures 6(c) and 6(e), in our method with with , the value leads to all the geometries of all the destinations being disjoint while the number of extracted destination using is much higher. The destinations are overlapping, and even some destinations are fully covered by the other destinations.
Figures 6(d) and 6(f) illustrate the extracted destinations with . Comparison of the figures with figures 6(c) and 6(e) clearly indicates the effect of parameter in our destination extraction method. In the latter figures, the destinations with fewer visit frequencies have been eliminated from the destinationgrids, and only the destinations which have more geometric similarity to car park areas have been left.
Comparing two figures 6(d) and 6(f) reveals the effect of the value of on the extracted destinations. The extracted destinations in both figures are quite similar except for the destination in the middle of the area. Fig. 6(d) has merged the area of the two neighboring car parks together while Fig. 6(f) has extracted two distinct geometries for the same destination. This shows the better performance of the method with parameter .
7.3 Paritioning Experimental Results
The GOIGrid, which is the result of constructing the GOIs based on the destinations in Fig. 6(f) is illustrated in Fig. 6(g). It is clearly seen that the partitioning method has resolved the problem of two destinations having a geometric overlap. The two destination regions in the middle of the Fig. 6(f) have been partitioned into two distinct cells in GOIGrid without having any intersection.
The Finalgrid, which is depicted in Fig. 6(h) is the last result of our partitioning. It is evident that the finalgrid guarantees both characteristics of a valid partition. None of the cells overlap each other and all the GPS points in the mobile object trajectory can be labeled with the ID of a cell in the final grid.
7.4 Geometric Similarity Evaluation Results
In this section, we use the geometric similarity as a quantitive metric to analyze the quality of our partitioning method compared to the baselines. We use Eq. 1 for analyzing the performance of the similarity of the real GOIs and the estimated GOIs. This metric uses the proportion of the area of the intersection of two geometries ( and ) to the area of the union of them.
Table 3, presents the calculated degree of geometric similarity between the geometries of the real GOIs (the red colored polygons in figure 6(g)) and their corresponding extracted GOIs (the blue colored polygons in figure 6(g)). As it is evident, our method has the highest values for the geometric similarity. Table 3 also shows that the values of geometric similarities vary based on different values for the parameters , , and .
Among the evaluated methods with different parameters, our method with has the best results. Therefore, the partitioning method which maximizes the geometric similarity (discussed in section 3) is our method with .
8 Conclusion and Future Work
In this paper, we addressed the problem of finding the Geometries of Interest of a mobile object and partitioning the trajectory area into a grid through analyzing its GPS trajectories. The research shows that considering the concept of timevalue of the GPS points significantly improves the accuracy of stay region extraction. Moreover, the results of this study support the idea that considering the geometries of the stay regions, makes the geometries estimated GOIs remarkably more similar to the real world GOIs.
This research has opened up many questions in need of further investigation and will serve as a base for future studies. It would be interesting to focus on improving the performance and the accuracy of our proposed partitioning method by aggregating the trajectory data of other mobile objects moving in the same area of our particular mobile object. Other improvements such as using outlier detection methods to detect and remove the outlier points from the point set of the destinations could improve the results further. Finding the best geometric similarity metric to improve the performance of the destination extraction phase would be another interesting research problem that could be addressed in the future.
References
 Andrew (1979) Andrew A (1979) Another efficient algorithm for convex hulls in two dimensions. Information Processing Letters 9(5):216 – 219
 Ankerst et al (1999) Ankerst M, Breunig MM, Kriegel HP, Sander J (1999) Optics: ordering points to identify the clustering structure. In: ACM Sigmod Record, ACM, vol 28, pp 49–60
 Ashbrook and Starner (2003) Ashbrook D, Starner T (2003) Using gps to learn significant locations and predict movement across multiple users. Personal and Ubiquitous Computing 7(5):275–286
 Aurenhammer (1991) Aurenhammer F (1991) Voronoi diagrams—a survey of a fundamental geometric data structure. ACM Comput Surv 23(3):pp. 345–405
 Banfield and Raftery (1993) Banfield JD, Raftery AE (1993) Modelbased gaussian and nongaussian clustering. Biometrics pp 803–821
 Bhattacharya et al (2012) Bhattacharya T, Kulik L, Bailey J (2012) Extracting significant places from mobile user gps trajectories: A bearing change based approach. In: Proceedings of the 20th International Conference on Advances in Geographic Information Systems, ACM, New York, NY, USA, SIGSPATIAL ’12, pp 398–401
 Bogorny et al (2009) Bogorny V, Kuijpers B, Alvares LO (2009) Stdmql: a semantic trajectory data mining query language. International Journal of Geographical Information Science 23(10):1245–1276
 Cho et al (2011) Cho E, Myers SA, Leskovec J (2011) Friendship and mobility: User movement in locationbased social networks. In: Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, ACM, New York, NY, USA, KDD ’11, pp 1082–1090
 Gidófalvi and Dong (2012) Gidófalvi G, Dong F (2012) When and where next: individual mobility prediction. In: MobiGIS, pp 57–64
 Handcock et al (2009) Handcock RN, Swain DL, BishopHurley GJ, Patison KP, Wark T, Valencia P, Corke P, OâNeill CJ (2009) Monitoring animal behaviour and environmental interactions using wireless sensor networks, gps collars and satellite remote sensing. Sensors 9(5):pp. 3586–3603
 Hariharan and Toyama (2004) Hariharan R, Toyama K (2004) Project lachesis: Parsing and modeling location histories. In: Egenhofer M, Freksa C, Miller H (eds) Geographic Information Science, Lecture Notes in Computer Science, vol 3234, Springer Berlin Heidelberg, pp 106–124
 Ji and Zha (2004) Ji X, Zha H (2004) Sensor positioning in wireless adhoc sensor networks using multidimensional scaling. In: INFOCOM 2004. Twentythird AnnualJoint Conference of the IEEE Computer and Communications Societies, vol 4, pp 2652–2661 vol.4
 Kourogi et al (2006) Kourogi M, Sakata N, Okuma T, Kurata T (2006) Indoor/outdoor pedestrian navigation with an embedded gps/rfid/selfcontained sensor system. In: Pan Z, Cheok A, Haller M, Lau R, Saito H, Liang R (eds) Advances in Artificial Reality and TeleExistence, Lecture Notes in Computer Science, vol 4282, Springer Berlin Heidelberg, pp 1310–1321
 Li et al (2011) Li Z, Han J, Ji M, Tang LA, Yu Y, Ding B, Lee JG, Kays R (2011) Movemine: Mining moving object data for discovery of animal movement patterns. ACM TIST 2(4):pp. 37–57
 Macagnano et al (2014) Macagnano D, Destino G, Abreu G (2014) Indoor positioning: A key enabling technology for iot applications. In: Internet of Things (WFIoT), 2014 IEEE World Forum on, pp 117–118
 Miller (2009) Miller J (2009) Fastest path analysis in a vehicletoinfrastructure intelligent transportation system architecture. In: Intelligent Vehicles Symposium, 2009 IEEE, pp 1125–1130
 Miller and Horowitz (2007) Miller J, Horowitz E (2007) Freesim  a free realtime freeway traffic simulator. In: Intelligent Transportation Systems Conference, 2007. ITSC 2007. IEEE, pp 18–23
 Min and Wynter (2011) Min W, Wynter L (2011) Realtime road traffic prediction with spatiotemporal correlations. Transportation Research Part C: Emerging Technologies 19(4):pp. 606 – 616
 Mousavi et al (2007) Mousavi SM, Moshref M, Rabiee HR, Dabirmoghaddam A (2007) Mobisim: a framework for simulation of mobility models in mobile adhoc networks. In: Proceedings of 3rd IEEE International Conference on Wireless and Mobile Computing, Networking and Communications, New York, USA
 Navstar (2008) Navstar G (2008) Gps standard positioning service (sps). URL http://www.gps.gov/technical/ps/2008SPSperformancestandard.pdf
 Palma et al (2008) Palma AT, Bogorny V, Kuijpers B, Alvares LO (2008) A clusteringbased approach for discovering interesting places in trajectories. In: Proceedings of the 2008 ACM Symposium on Applied Computing, ACM, New York, NY, USA, SAC ’08, pp 863–868
 Scellato et al (2011) Scellato S, Musolesi M, Mascolo C, Latora V, Campbell AT (2011) Nextplace: A spatiotemporal prediction framework for pervasive systems. In: Pervasive, pp 152–169
 Schubert et al (2015) Schubert E, Koos A, Emrich T, Züfle A, Schmid KA, Zimek A (2015) A framework for clustering uncertain data. PVLDB 8(12):1976–1987
 Si et al (2010) Si H, Wang Y, Yuan J, Shan X (2010) Mobility prediction in cellular network using hidden markov model. In: Consumer Communications and Networking Conference (CCNC), 2010 7th IEEE, pp 1–5
 Song et al (2006) Song L, Deshpande U, Kozat U, Kotz D, Jain R (2006) Predictability of wlan mobility and its effects on bandwidth provisioning. In: INFOCOM 2006. 25th IEEE International Conference on Computer Communications. Proceedings, pp 1–13
 Xiao et al (2010) Xiao X, Zheng Y, Luo Q, Xie X (2010) Finding similar users using categorybased location history. In: Proceedings of the 18th SIGSPATIAL International Conference on Advances in Geographic Information Systems, ACM, New York, NY, USA, GIS ’10, pp 442–445
 Xiao et al (2014) Xiao X, Zheng Y, Luo Q, Xie X (2014) Inferring social ties between users with human location history. Journal of Ambient Intelligence and Humanized Computing 5(1):pp. 3–19
 Xue et al (2013) Xue AY, Zhang R, Zheng Y, Xie X, Huang J, Xu Z (2013) Destination prediction by subtrajectory synthesis and privacy protection against such prediction. In: IEEE International Conference on Data Engineering (ICDE 2013), IEEE
 Yan et al (2011) Yan Z, Chakraborty D, Parent C, Spaccapietra S, Aberer K (2011) Semitri: a framework for semantic annotation of heterogeneous trajectories. In: Proceedings of the 14th International Conference on Extending Database Technology, ACM, pp 259 –270
 Ye et al (2009) Ye Y, Zheng Y, Chen Y, Feng J, Xie X (2009) Mining individual life pattern based on location history. In: Mobile Data Management: Systems, Services and Middleware, 2009. MDM ’09. Tenth International Conference on, pp 1–10
 Zheng et al (2012) Zheng VW, Zheng Y, Xie X, Yang Q (2012) Towards mobile intelligence: Learning from {GPS} history data for collaborative recommendation. Artificial Intelligence 184â185:pp. 17 – 37
 Zheng and Zhou (2011) Zheng Y, Zhou X (eds) (2011) Computing with Spatial Trajectories. Springer
 Zheng et al (2008) Zheng Y, Li Q, Chen Y, Xie X, Ma WY (2008) Understanding mobility based on gps data. In: Proceedings of the 10th international conference on Ubiquitous computing, ACM, New York, NY, USA, UbiComp ’08, pp 312–321
 Zheng et al (2009) Zheng Y, Zhang L, Xie X, Ma WY (2009) Mining interesting locations and travel sequences from gps trajectories. In: Proceedings of the 18th international conference on World wide web, ACM, New York, NY, USA, WWW ’09, pp 791–800
 Zheng et al (2010) Zheng Y, Chen Y, Li Q, Xie X, Ma WY (2010) Understanding transportation modes based on gps data for web applications. ACM Trans Web 4(1):1:1–1:36
 Zhou et al (2004) Zhou C, Frankowski D, Ludford P, Shekhar S, Terveen L (2004) Discovering personal gazetteers: An interactive clustering approach. In: Proceedings of the 12th Annual ACM International Workshop on Geographic Information Systems, ACM, New York, NY, USA, GIS ’04, pp 266–273