22
Spatio-Temporal Databases Moving Objects

Spatio-Temporal Databases

  • Upload
    adonia

  • View
    56

  • Download
    5

Embed Size (px)

DESCRIPTION

Spatio-Temporal Databases. Moving Objects. Introduction. Spatiotemporal Databases: manage spatial data whose geometry changes over time Geometry: position and/or extent Global change data: climate or land cover changes Transportation: cars, airplanes Animated movies/video DBs. - PowerPoint PPT Presentation

Citation preview

Page 1: Spatio-Temporal Databases

Spatio-Temporal Databases

Moving Objects

Page 2: Spatio-Temporal Databases

Introduction Spatiotemporal Databases: manage spatial

data whose geometry changes over time Geometry: position and/or extent Global change data: climate or land cover

changes Transportation: cars, airplanes Animated movies/video DBs

Page 3: Spatio-Temporal Databases

Spatio-temporal Queries Historical Queries: Store the past the

history of a spatio-temporal evolution. R-tree, MV3R-tree (PPR-tree)

“Future” Queries: Find the future positions of moving objects. Indexing?

Page 4: Spatio-Temporal Databases

Indexing moving objects Database stores the current location of

each object and the velocity vector. Example: cars moving in a highway

system. GPS can provide position/velocity

Page 5: Spatio-Temporal Databases

Moving Objects: Queries Range Queries NN queries Aggregation queries

Q

Page 6: Spatio-Temporal Databases

Moving Objects:Representation

Consider the 1-d case (objects moving on a line) Storing the locations of moving objects is a

challenge: Update the database with the new locations Use a function of time f(t) to store a location

Update overhead is reduced; update the database only when velocity changes

utvtf )(

Page 7: Spatio-Temporal Databases

Space-time Trajectories are plotted as lines in

the time-location space (y, t); p(t) = vt+a

(t) time

oo

o

o1

2 3

4

trajectories

Page 8: Spatio-Temporal Databases

Indexing Use R-tree to index the lines Large MBRs,

extensive overlap Use a Quadtree approach (or a grid)

Partition the space into cells, store for each cell the lines that intersect it

Disk space is increased

Page 9: Spatio-Temporal Databases

Dual space-time Idea: map a line to a point

),( avavty

(y) location

(t) time

intercept

slope

intercept

oo

o

o1

2 3

4

o

o

o

1

2

3

trajectories

Page 10: Spatio-Temporal Databases

Dual space-time indexing Query must be transformed. [(y1q, y2q), (t1q,

t2q)] a + t2qv >= y1q and a+ t1q v <= y2q , for v>0 a + t1qv >= y1q and a+ t2q v <= y2q , for v<0 a

v vmin vmax

y1q y2q

Page 11: Spatio-Temporal Databases

Dual space-time indexing Another transformation (Hough-Y) is:

The difference is that we compute the intercept over a horizontal line

Queries in the dual space are similar with the previous transformation

),1(1va

vva

vyt

Page 12: Spatio-Temporal Databases

Hough-Y spaceu

bt2qt1q

1/vmin

1/vmax

E1

E2

Page 13: Spatio-Temporal Databases

Querying the dual space Use a PAM to index the dual points,

change the search function to find the points inside the query

Problem: Partitioning is not aligned with the queries many I/Os

An idea is to try to store multiple structures, one for each set of queries with similar slope

Page 14: Spatio-Temporal Databases

Improving the query In the Hough-Y, the slope of the queries

is y1q – yr (or y2q – yr)

time

location

query

y1

y2

y3

Page 15: Spatio-Temporal Databases

Improving the query

Compute the dual using multiple y-lines Store an R-tree for each line Given a query, find the line that is closer

to the query and then use the corresponding index

Thus, the query will appear as vertical as possible better performance

Page 16: Spatio-Temporal Databases

Indexing in 2-dimensions

The dual transformation can be extended to 2 dimensional points

Map the trajectories in a point in 4-d using the transformations on x-t and y-t planes

Use the 1-d structures to answer a query

Page 17: Spatio-Temporal Databases

Dual for 2-D Moving Objects

Using Hough-X: Map a moving point p with location (px, py) and

velocity (vx, vy) to the 4D point (vx, ax, vy, ay) Query is also transformed to a linear constraint

query: Q=[(x1q, x2q), (y1q, y2q), (t1q, t2q)]

ax + t2qvx >= x1q and ax+ t1q vx <= x2q ay + t2qvy >= y1q and ay+ t1q vy <= y2q x1qvy - y2qvx <= axvy – ayvx<= x2qvy - y1q vx

Page 18: Spatio-Temporal Databases

TP R-tree Time-Parametrized R-tree Store the MBRs as functions of

time The MBRs grow with time, at any

time instant in the future we can compute the “MBR”

Page 19: Spatio-Temporal Databases

Motion function

-2-2

c

2-2

d

1-1

a1

11

b

-1

20 4 6 8 10

2

4

6

8

10

x axis

y axis

1

-2-2

1

at time 0

c

d

a

b

20 4 6 8 10

2

4

6

8

10

x axis

y axis

at time 1

For each object, the database stores Its minimum bounding rectangle (MBR) at the reference time 0 Its current velocity bounding rectangle (VBR) Examples: MBR(a)={2,4,3,4}, VBR(a)={1,1,1,1};

MBR(c)={8,9,8,9} An update is necessary only when an object’s VBR changes.

Page 20: Spatio-Temporal Databases

TPR – MBRs

20 4 6 8 10

2

4

6

8

10

x axis

y axis

v

E

2-1

2

1

-1

query window

-1

u

-1

1

20 4 6 8 10

2

4

6

8

10

x axis

y axis

v

E

u

query window

(a) The boundaries at current time 0 (b) The boundaries at future time 1

Page 21: Spatio-Temporal Databases

Insertion and Deletion

Insertion and Deletion similar to R*-tree The only difference is that you have to compute

the values: margin, overlap, volume over time Trick: try to optimize the structure for the next H

time instants. Another optimization: when you update an

object, re-compute the MBR at the current time

Page 22: Spatio-Temporal Databases

o1

o2

o3

o4

tupdate

y

time

An example of update and re-computation of MBR (1D)Reference:Simonas Saltenis, Christian S. Jensen, Scott T. Leutenegger, Mario A. Lopez: Indexing the Positions of Continuously Moving Objects. SIGMOD Conference 2000: 331-342