support three-dimensional intersection and indexing
operations. As a consequence, there is a strong inter-
est in those methods which, even using off-the-shelf
solutions, allow to solve the problem in the three-
dimensional space.
In (d’Acierno et al., 2011), problems related to
3D data are solved by means of a redundant storing
method that, at the extent of an increased spatial com-
plexity, allows to index data using widely available
bidimensional strategies. In this paper we propose
a system that, even still using well-established bidi-
mensional indexes, substantially avoids any redun-
dancy in the stored data; the resulting querying time,
moreover, is substantially decreased when compared
to (d’Acierno et al., 2011) even thanks to a segmen-
tation algorithm aimed at optimizing the use of the
adopted indexes.
2 THE PROPOSED METHOD
A three dimensional trajectory is usually referred to
as a sequence of spatio-temporal points:
T
i
=< P
i
1
, P
i
2
, ..., P
i
N
>
where the generic point P
i
k
= (x
i
k
, y
i
k
,t
i
k
) represents the
spatial location (x
i
k
, y
i
k
) of an object at the time instant
t
i
k
. From now on, we will use the line segments model
(Pfoser et al., 2000), each segment being the line con-
necting two consecutive points.
Figure 1: A query box representing a TIQ.
A trajectory-based time interval query (TIQ) aims
at detecting all those objects’ trajectories passing
through a given spatial area in a given time interval.
Here, we think to the area as a rectangle with coordi-
nates (x
min
, y
min
) and (x
max
, y
max
) while [t
s
,t
e
] are the
starting and final time instants. According to this as-
sumption, each TIQ can be associated to a query box
B (Figure 1), which identifies the spatio-temporal vol-
ume possibly containing the trajectories.
To solve a TIQ, we have to verify, for each tra-
jectory, if at least one of its segments intersects the
query box. The intersection between a segment and
a box can be verified by using a clipping algorithm,
a well-known family of algorithms widely used for
identifying the portion of an image which is either
outside or inside a picture. One of the most effi-
cient is the Cohen-Sutherland Line Clipping Algo-
rithm (Newman and Sproull, 1979), which works, in
its 3D formulation, by subdividing the plane into 27
regions by extending the faces of the query box.
However, despite its simplicity, the use of a
clipping algorithm is not suited for handling large
datasets: in fact, in the worst case, arising when a
trajectory does not intersect the query box, all the
trajectory’ segments must be processed, making this
approach unfeasible for a large amount of trajectory
data. It means that, in real applications, it is necessary
to make use of more efficient approaches, as the ones
using suitable indexing strategies, known as spatial
indexing. Spatial indexes allow to efficiently perform
queries involving geometry data types such as points,
lines and polygons; a query in this case represents a
spatial relationship among these geometric entities.
In the 3D space, given a trajectory T
k
and a query
box B, it is straightforward to observe that, if T
k
inter-
sects B, then the projection of T
k
on each coordinate
plane also intersects the correspondentquery box pro-
jection; this of course represents a necessary but not
sufficient condition, as the opposite is clearly not true.
Thus, if all projections of T
k
intersect the correspon-
dent box projections, we suggest to consider T
k
as a
candidate to be clipped in the 3D space.
According to the above considerations, in
(d’Acierno et al., 2011), for each 3D trajectory T
k
,
we proposed to store three 2D trajectories obtained
by projecting T
k
on the xy plane (T
k
xy
), on the xt plane
(T
k
xt
) and on the yt plane (T
k
yt
). Given a box B repre-
senting the time interval query to be solved, we sim-
ilarly considered B
xy
, B
xt
and B
yt
. By using one of
the available bidimensional indexes, it is possible to
efficiently find, on each coordinate plane kz, the set:
Θ
kz
= {T
kz
: MBR(T
kz
) ∩B
kz
6=
/
0} (1)
The set Θ of trajectories to be clipped in the 3D space
is thus trivially defined as:
Θ = {T : T
xy
∈ Θ
xy
∧ T
xt
∈ Θ
xt
∧ Θ
yt
∈ T
yt
} (2)
This strategy, while taking advantage of widely
available efficient bidimensional indexes, still
presents two weak points. First, for a n points
trajectory, we need to redundantly store 6 · n values
(2·n for each of the three coordinate planes). Another
subtle crucial point is that the use of bidimensional
indexes is not optimized: as a matter of fact, the
MBR of each projected trajectory can easily span a
great percentage of the whole area.
KDIR2012-InternationalConferenceonKnowledgeDiscoveryandInformationRetrieval
228