A Grid Based Trajectory Indexing Method For Moving Objects On Fixed Network

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

A Grid Based Trajectory Indexing Method for

Moving Objects on Fixed Network

Menglong Huang1,2*, Peng Hu1 , Lanfang Xia3


1
School of Resource and Environment Science, Wuhan University, Wuhan 430072, China
2
Fujian Provincial Geomatics Center, Fuzhou 350003, China
3
Shanghai Surveying and Mapping Institute, Shanghai 200063, China
Corresponding author: longlong273@163.com

Abstract—The management of moving objects is an intensive The rest of this paper is organized as follows. In section 2
study area in recent years. Currently many researches focus on we introduce the related works, in section 3 we briefly
objects freely moving on 2-dimensional space, and a lot of index introduce common network models used in trajectory indexing
strategies have been proposed, while they are not applicable for and the one that we use, and in section 4 we describes our
objects moving on fixed networks. As objects moving on fixed index strategy and associated algorithms. In section 5 we make
networks are pervasive in real application, its study is of great an analysis about the proposed index structure and an
practical significance. As changing over time frequently is a main experiment to evaluate its performance. We conclude the paper
characteristic of moving objects’ position, index strategies for in Section 6.
moving objects’ trajectories need to provide efficient dynamic
updating ability besides high query performance. In this paper,
we propose an efficient index strategy named Grid Partition R- II. RELATED WORK AND MOTIVATION
Tree (GPR-Tree), for indexing trajectories of moving objects on Index strategies for trajectories of freely moving objects are
fixed network. By dividing the network space into grids of not completely applicable for network constrained moving
different size and indexing trajectories in each grid, GPR-Tree objects, as the movements of the latter show much
provides efficient query as well as updating performance for
difference. Kollios et al. [8] held that, as road network can be
moving objects’ trajectories.
indexed with a traditional index, like R-Tree, network
Keywords-GPR-Tree; Moving object; Index structure; Network constrained moving objects are moving in a 1.5 dimensional
model; space in fact. D. Pfoser et al. [9] pointed out that there are
difficulties using a 3-dimensional R-Tree to index network
contrained moving objects’ trajectories as it will introduce
I. INTRODUCTION large amounts of “dead space”, and proposed a mapping
With the development of GPS, mobile computing and algorithm to reduce trajectories’ dimensionality.
wireless communication techniques, Vehicle Navigation
(VNS), Location Based Service (LBS), Intelligent There are some index structures proposed for network
Transportation and other applications spring up. Real-time constrained moving objects’ trajectories recently. FNR-Tree
tracking and recording moving objects’ position is becoming (Frentzos, 2003) [10], IMORS (Kyoung-Sook Kim et al. 2004)
more and more important. How to efficiently store, index and [11] and MON-Tree (Almeida and Güting, 2005) [12] are three
query tremendous trajectory data of moving objects is a hot and main index structures for network contrained moving objects’
difficult problem of spatio-temporal GIS. trajectories. Some other index structures were also proposed,
such as MON+-Tree [13], FNR+-Tree [14], TNR+-TREE [7],
There are three types of object’s movement according to D. MONC-Tree [15] etc. They made some modifications to FNR-
Pfoser [1]: free movements, constrained movements and Tree or MON-Tree to improve their performance.
movements on network. Currently many researches focus on FNR-Tree (Fixed Network R-tree) was proposed by
managing objects freely moving in 2-dimensional space and a Frentzos in 2003 to index trajectories of moving objects on
lot of index strategies have been proposed, including 3D R- fixed network in 2-dimensional space. This index structure is
Tree [2], TPR-Tree [3], HR-Tree [4], MV3R-Tree [5], PPR- composed of a 2D R-Tree and a forest of 1D R-Trees. The 2D
Tree [6], etc. As many objects move on road network in real R-Tree is used to index spatial road network. Each leaf of the
application, network constrained movements are pervasive and 2D R-Tree points to a road segment and associates a 1D R-
of great research significance. According to [7], index Tree to index the time interval of each object’s movements
strategies for moving objects can be categorized into three inside the road segment. As the basic index unit on the top 2D
types: index for historical trajectories of moving objects, index R-Tree is a single line segment, there will be too much index
for current trajectories and index for current and future entries. FNR-Tree has to maintain a large number of 1D R-
trajectories. This paper focuses on indexing historical Trees, which leads to a great amount of storage overhead.
trajectories of moving objects and proposes an index strategy Trajectories that reflect objects’ moving state change between
named GPR-Tree (Grid Partition R-Tree). the start and end point of a line segment can not be indexed
with FNR-Tree, because only time intervals are stored in its 1D Moving objects’ position on an edge can be defined as a
R-Tree. MON-Tree overcomes some drawbacks of FNR-Tree. fraction between 0 and 1, where 0 means that the position is on
It has the similar structure to FNR-Tree. The main difference is the start point of the edge and 1 means that the position is on
that the basic index unit in the top 2D R-Tree is a route instead the end point of the edge. In order to distinguish moving
of a line segment, which can greatly reduce the number of objects’ positions in different edges, we use the real position P
index entries. By replacing the bottom 1D R-Tree with a 2D R- (between 0 and 1) on an edge plus the id of the edge to
Tree, MON-Tree can index trajectories recording objects represent moving objects’ position, thus moving objects’
moving state change at any position of a route. As the size of position on a edge can be defined as P’ = eid + P, where eid is
MBRs of routes is much larger than those of road segments, the identifier, a integer, of the edge e.
they will result in much dead space and overlapping space in
the top 2D R-Tree and greatly affect query performance of IV. THE GPR-TREE
MON-Tree.
In this paper, we propose a grid partition based index A. The GPR-Tree Structure
structure for network contrained moving objects’ trajectories, The basic idea of GPR-Tree is partition index. First, we
named Grid Partition R-Tree (GPR-Tree). GPR-Tree divides divide objects’ moving space, or road network space, into grids
the 2-dimensional network space into grids (or subspaces) of of different size, put moving objects’ trajectories into different
different size, and index objects’ trajectories in each grid. GPR- grids, to reduce query extent, and then index trajectories in
Tree can improve query performance and updating efficiency each grid. GPR-Tree is composed of the top part and the
by improving index method. bottom part, as illustrated in figure 2. The top part is the static
road network index and the bottom part is the dynamic
III. ROAD NETWORK MODEL trajectory index.
There are mainly three network models used in indexing
network constrained moving objects’ trajectories: road segment
oriented [10], edge oriented and route oriented [12].
Intersection-Oriented network model also has been proposed
[16]. Road network can be described as a graph, a road
segment is a line ends with two nodes, an edge is a polyline
that ends with two intersections, and a route is composed of
some connected edges. The size of the basic index unit
increases in turn for the index strategies using the three
network models and trajectory update strategies differ too.
Route oriented road network model can reduce trajectory
entries, while it will dramatically decrease query efficiency.
We also notice that when objects moving on road network, the
change of edge is a main factor to trigger trajectory update,
especially on busy roads, as it tends to cause objects’ moving
state change, such as speed, moving direction, etc. Edge
oriented road network model can provide more flexibility for Figure 1. GPR-Tree index structure
moving objects related query, such as nearest neighbor query.
Edge oriented road network model is used in GPR-Tree taking The top part of GPR-Tree is composed of a 2D R*-Tree
all these into consideration. and a hash table. With the 2D R*-Tree, we divide object’s
moving space, i.e. road network space, into grids of different
Edge oriented network model can be represented as a size. Differs from the top part road network index of FNT-Tree
collection of edges and intersections: G=(R, J). Here G or MON-Tree, the leaf node of the 2D R*-Tree in GPR-Tree
represents a graph; R represents a set of edges and J a set of does not point to a route or a line segment object, but to a grid,
intersections. An edge can be defined as a polyline ends with or subspace that should not be divided any more. Network
two intersections (not nodes), so edges will not intersect with space is divided according the distribution of edges. We define
each other. We also stipulate that the direction of an edge is that the leaf the 2D R*-Tree can cover M edges at most and m
defined by its start and end points, and two flags are used to edges at least. If a node covers more than M nodes, it must be
represent the direction: 0 means moving from start to end and 1 split. The structure of the root and intermediate nodes of the 2D
means from end to start. R*-Tree is of the form (MBR, {pChild}), where MBR is a
In real application, objects’ moving state may change minimum bounding box containing all MBRs of its children’s
between the start and end point of an edge. For example, a car MBRs, {pChild} represents pointers to its children. The leaf of
can turn into a car park or stop for more gas at a service station this 2D R*-Tree represents a grid covers edges, whose
on a road. In this paper we take into account these cases and structure is of the form (MBR, {e}, pChild), where MBR is the
GPR-Tree can index trajectories that describe objects’ moving minimum bounding box of the leaf node, {e} is the identifiers
state change between the start and end point of an edge. (IDs) of edges, and pChild is a pointer to a bottom 2D R*-Tree,
which indexes objects’ trajectories fall in this grid. Note there
may be overlaps between grids, but the trajectories have no
overlaps as they are constrained inside an edge. The hash table through the bottom 2D R*-Tree associated with each grid.
is used to improve trajectory updating efficiency. Its entry is of Arguments provided for spatio-temporal window query is
the form (eid, pGrid), where eid represents the id of an edge defined as (xmin, xmax, ymin, ymax, tmin, tmax), and the query
and pGrid points to a grid, or leaf node of the top 2D R*-Tree operation is executed in the following steps:
(not to the bottom 2D R*-Tree). With this edge-grid hash table,
we can quickly find the grid that an edge falls. Step1 Define GEOBOX as (xmin, xmax, ymin, ymax), and
TBOX as (tmin, tmax), using 2D R*-Tree’s search algorithm
The bottom part of GPR-Tree is a forest of 2D R*-Trees. with GEOBOX to get a collection of leaf nodes, or grids, that
Each 2D R*-Tree indexes objects’ trajectories fall in the extent intersect with GEOBOX, in the top 2D R*-Tree. Set the grid
of a grid. Because an edge oriented road network model is used collection as G = {Gi}.
in GPR-Tree, each trajectory will fall in one grid and be
indexed only one time. The root and intermediate node For each grid Gi in the collection, execute Step2 to Step4.
structure of the bottom 2D R*-Tree is in the form of (Ts, Te, Step2 Retrieve the edges’ Ids E = {Ei} in grid Gi, and the
Ps, Pe, pChild), where Ts and Te represent the minimum and bottom 2D R*-Tree Ri associated with Gi. For each Ei, follow
maximum time of the node, Ps and Pe represent position extent Step3 to Step4.
of the node, {pChildren} is a collection of pointers to its
children. The leaf node structure is in the form of (mid, Ts, Te, Step3 Retrieve the Edge with Identifier Ei and determine if
Ps, Pe, v, d), where mid is the identifier of the moving object Ei intersects with GEOBOX, if so, calculate positions(Psi, Pei)
of the trajectory, Ts and Te represent the start and end time, Ps where GEOBOX intersects Ei, and then get the positions on
and Pe are start and end position, d is moving direction and v is this edge (Psi’, Pei’), where Psi’= Psi+ Ei and Pei’= Pei + Ei.
velocity. In order to indicate the edge where a trajectory falls Step4 Compose a query window (Psi’, Pei’, tmin, tmax)
on, positions in each node of the bottom 2D R*-Tree is using (Psi’, Pei’) and TBOX, execute 2D R*-Tree’s query
calculated by the edge’s id plus the position on the edge, as is algorithm on the bottom 2D R*-Tree Ri, find a collection of
described in 3.1. As each edge has a unique id, moving objects’ child nodes {(mid, rid, ps, pe, ts, te)}, then add the mids to the
positions on different edges can be distinguished. query result set.

B. Trajectory Update Algrithm D. On Grid Size


As road network is static, its index can be generated and GPR-Tree divides objects’ moving space into grids, or
network space can be divided beforehand. The difference subspace, through the top 2D R*-Tree. Each grid (a leaf node
between GPR-Tree’s 2D R*-Tree road network index and of 2D R*-Tree) covers n edges, where m<n<M. When M is too
other 2D R*-Tree index is that its leaf is a grid contains several small, there will be too much 2D R*-Trees in the dynamic part
edges instead of a single edge. Note an entry needs to be added of GPR-Tree, which has an adverse effect on storage
to the edge-grid hash table every time an edge is inserted in management. On the other way, the bottom 2D R*-Tree’s size
road network index, or update the hash table when the position will be too large when M is big, which will affect trajectory
of the entry’s edge in the index is changed. It’s not necessary to query and updating efficiency, because R-Tree is a high
take into account network index update while updating objects’ balance tree, trajectory insertion involves complex and time
trajectories. consuming operations such as node splitting and merging. It is
Arguments provided for trajectory update is in the form of necessary to determine grid size, or M value, as it will greatly
(mid, eid, ps, pe, ts, te), here mid indicates the identifier of affect GRP-Tree’s performance.
moving object, eid is the identifier of the edge, ps and pe is the An alternative way is to replace the bottom 2D R*-Trees
start and end position of trajectory on the edge identified by with 1D R*-Trees, which only index time interval, as was done
eid, and ts and te represent the start and end time of the in FNR-Tree, and the leaf node structure remains the same.
trajectory. Trajectory updating efficiency will be dramatically improved
Set ps2 = eid + ps and pe2 = eid + pe, then trajectory as insertion operation on 1D R*-Tree is less complex, but
update algorithm can be described as follows: query efficiency will decrease. Its performance needs to be
further examined.
Step1 Using eid to get the grid G where eid falls through
the edge-grid hash table. V. PERFORMANCE ANALYSIS AND EXPERIMENT
Step2 Check if there is a 2D R*-Tree associated with the As each grid contains a number of edges, GRP-Tree has
grid G, if not, allocate a 2D R*-Tree and associate it with the much less R-Trees in the lower dynamic part than FNR-Tree.
grid G. GPR-Tree can index trajectories between start and end point of
Step3 Insert the trajectory (mid, rid, ps2, pe2, ts, te) into the an edge, which is a disadvantage of FNR-Tree. Compared to
2D R*-Tree using the 2D R*-Tree’s insertion algorithm. MON-Tree, GPR-Tree using an edge oriented network modal,
thus has more index entries, but can provide more flexibility
C. Spatio-temporal Window Query Algorithm for moving objects related query, such as nearest neighbors
query.
The spatio-temporal window query operation of GPR-Tree
can be divided into two stages. First, determine the grids that
intersect with the query extent. Then filter out trajectories
GPR-Tree can limit the bottom 2D R*-Tree’s size in some VI. CONCLUSIONS AND FUTURE WORK
degree through space partition, which helps to improve In the paper, a simple and efficient index structure for
trajectory updating efficiency compared to MON-Tree. network constrained moving objects’ history trajectories,
Spatio-temporal window query using GPR-Tree needs two named GPR-Tree, is proposed based on network space
steps. First determining the grids and edges intersecting with partition. GPR-Tree is composed of a hash table and a 2D R*-
given spatial extent through the top 2D R*-Tree. Then retrieve Tree to index road network, and a forest of 2D R*-Trees to
trajectories through the bottom 2D R*-Tree with the query index trajectories. Algorithms for trajectory update, spatio-
windows formed by time range and each intersecting edge’s temporal window query are also provided. In the future work,
position ranges. The experiment shows that the most time- we will try to combine GPR-Tree with other index methods so
consuming part of query is calculating the intersecting as it can provide more query operations, and introduce parallel
positions of spatial query window and edges. GPR-Tree calculating technique to improve its query and updating
provides better query performance than MON-Tree, because it efficiency.
uses 2D R*-Tree to index road network , and the edge oriented
network model, instead of the route oriented, is used for REFERENCES
network modeling, the latter will result in large “dead space” [1] D. Pfoser, “Indexing the Trajectories of Moving Objects,” IEEE Data
and overlapping space. Engineering Bulletin, vol.25(2), pp.2-9, 2002.
A personal computer with an Intel Pentium 4 processor, 3 [2] Y. Theodoridis, M. Vazirgiannis, and T. Sellis, “Spatio-Temporal
Indexing for Large Multimedia Applieations,” in Proceedings of the
GHz, and 2 GB of RAM is used in the experiment. Road IEEE Conference on Multimedia Computing and Systems(ICMCS),
network data used in the experiment is the base roads of Pitt 1996.
County in North Carolina, USA. The road network data is [3] S. Leutenegger, J. M. Edgington and M. A. Lopez, “STR: A Simple and
obtained from the tutorial data of ArcGIS, offered by ESRI, Effieient Algorithm for R-tree Packing,” in Proceedings of the 13th
and GPR-Tree is implemented using C#. Trajectory data are IEEE Conference on Data engineering(ICDE), pp. 497-506, 1997.
prepared beforehand using a trajectory editing tool developed [4] M. A. Naseimento, and J. R. O. Silva,“Towards Historical R-Trees,” in
with ArcGIS Engine. We make a comparison of spatio- Proceedings of the ACM Symposium on Applied Cmoputing, 1998.
temporal window query and trajectory updating performance [5] Y. Tao and D. Papadias, “The MV3R-Tree: A Spatio-Temporal Aeeess
between GPR-Tree and route oriented MON-Tree in the Method for Time stamp and Interval Queries,” in Proceedings of the
International Conference on Very Large Databases(VLDB), 2001.
experiment. Experimental result, as illustrated in figure 2 and
[6] G. Kollios, V. J. Tsotras, D. Gunopulos, A. Delis, and M.
figure 3, shows that GPR-Tree’s trajectory updating efficiency Hadjieleftheriou, “Indexing Animated Objeets Using Spatiotemporal
is equivalent to MON-Tree, or a little lower, as it has to index Aeeess Methods,” IEEE Transactionson Knowledge and Data
more trajectories, but it provides better performance for spatio- Engineerng(TKDE), vol.13(5), pp.758-777, 2001.
temporal window query. [7] Alshaer J. J. and Gubarev V. V., “Indexing Moving Objects on
Transportation Networks,” The Third International Forum on Strategic
Technologies, pp. 249-252, 2008.
[8] G. Kollios, D. Gunopulos and V. Tsotras, “On Indexing Mobile
Objects,” in Proceedings of the 18th ACM Symposium on Principles of
Database Systems, Philadelphia, PA, USA, pp.261-272, 1999.
[9] C. S. Jensen, and D. Pfoser, “Indexing of Network Constrained Moving
Objects,” in Proc. of the 11th Intl. Symp. on Advances in Geographic
Information Systems, 2003.
[10] E. Frentzos, “ Indexing Objects Moving on Fixed Networks,” In Proc. of
the 8th Intl. Symp on Spatial and Temporal Databases, pp.289-305,
2003.
[11] Kyong-Sook Kim, Si-Wan Kim, and Tae-Wan Kim. “Fast Indexing and
Updating Method for Moving Objects on Road Networks,” in Proc. of
Figure 2. Index updating cost vs. mo Num the 4th Intl. Conf. on Web Information Systems Engineering
Workshops, pp.34-42, 2003
[12] Victor T. D. A., and Ralf H. G., “Indexing the Trajectories of Moving
Objects in Networks,” GeoInformatica. vol.9 (1), pp.33-60, 2005
[13] ZHANG Jing-min, WANG Pei-chong, and LU Feng-jia, “Indexing
Method of Moving Objects on Networks,” Computer Engineering and
Applications. vol.45(12), pp.144-146, 2009.
[14] GUO JingFeng, WANG JianChao, DONG HongYu and YAN LiHua,
“Indexing Scheme of Moving Objects on Fixed Networks,” Computer
Science. vol.31(7), pp.68-70, 2006.
[15] LI Xuefei, FU Peihong and LIU Jingnan, “Spatio-temporal Index Based
on Networks,” Geomatics and Information Science of Wuhan University.
vol.31(7), pp.620-623, 2006.
[16] Kyoung Soo Bok, Ho Won Yoon, Dong Min Seo, Su Min Jang,
Myoung-Ho Kim, and Jae Soo Yoo, “Indexing the Current Positions of
Figure 3. Query response time vs. query window size Moving Objects on Road Networks,” APWeb/WAIM Workshops 2007,
pp.247-252, 2007.

You might also like