data structures for moving objects
play

Data Structures for Moving Objects Pankaj K. Agarwal Center for - PDF document

Data Structures for Moving Objects Pankaj K. Agarwal Center for Geometric Computing Department of Computer Science Duke University Center for Geometric Computing Geometric Data Structures S : Set of geometric objects Points, segments,


  1. Data Structures for Moving Objects Pankaj K. Agarwal Center for Geometric Computing Department of Computer Science Duke University Center for Geometric Computing Geometric Data Structures S : Set of geometric objects Points, segments, polygons ✫ Ask several queries on S • Range searching • Nearest-neighbor searching BSP kd−Tree Quad Tree Data Structures for Moving Objects Center for Geometric Computing 1

  2. Moving Objects: Applications ✫ Traffic management • Location based services • Emergency services • Air traffic control ✫ Digital battlefields ✫ Molecular biology ✫ Deformable objects ✫ Adhoc networks Need data structures for storing, analyzing, querying moving objects. Data Structures for Moving Objects Center for Geometric Computing 2 Modeling Motion p ( t ) = ( x ( t ) , y ( t )) : Position of p at time t . • x ( · ) , y ( · ) : Polynomials • Degree of motion: max degree of x ( · ) , y ( · ) . p(t) • Linear motion: Degree of motion is 1 a , b ∈ R 2 p ( t ) = a t + b , ✫ Mostly assume motion to be linear ✫ Trajectory of points can change ✫ Trajectory can be piecewise linear Issues: ✫ Sampled motion ✫ Hierarchical motion ✫ Uncertainty Data Structures for Moving Objects Center for Geometric Computing 3

  3. Range Searching S : Set of points Preprocess S into a data structure Report all points of S lying inside a query rectangle Data Structure Space Query log n n log n + k Range tree log log n √ n + k n kd-tree External memory data structures also available Example: R-tree Data Structures for Moving Objects Center for Geometric Computing 4 Kinetic Range Searching S : Set of points, each moving with fixed velocity in the plane Preprocess S into a data structure: Q1 Given a rectangle R and a time value t , report all points of S ( t ) ∩ R Q2 Given a rectangle R and time values t 1 , t 2 , report all points that pass through R during the time interval [ t 1 , t 2 ] . t t y y x x Data Structures for Moving Objects Center for Geometric Computing 5

  4. Early Approaches ✫ One-dimensional data structures [Wolfson et al. ’98-’99, Tayeb et al. ’98, Kollios et al. ’99] ✫ Two-dimensional data structures • Map trajectories to higher dimensional points [Kollios et al.] • Build index on trajectories [Pfoser et al.] • Parametric R-trees [Saltenis et al.] Assumes frequent updates on trajectories Data Structures for Moving Objects Center for Geometric Computing 6 Kinetic Range Searching (A., Arge, Erickson, 2001) ✫ Partition-tree based approach • O ( n ) space, ∼ √ n + k query time • log 2 n insertion/deletion/trajectory-change • Time oblivious scheme ✫ Kinetic range trees • n log n/ log log n space, log n + k query • Events: x - or y -coordinates of two points become equal • Θ( n 2 ) events, each requiring log 2 n time • Tradeoff between # events and query time • Queries have to arrive in a chronological order Data Structures for Moving Objects Center for Geometric Computing 7

  5. Partition Tree Based Approach t t yt* xt* t y y x x ✫ Trajectory of a point p i is a line ℓ i in R 3 ✫ p i ( t ) ∈ R ⇐ ⇒ ℓ i intersects ( R, t ) ✫ ℓ x , ℓ y : Projection of ℓ onto the xt - & yt -planes ✫ ℓ intersects ( R, t ) ⇔ ℓ x intersects ( R x , t ) & ℓ y intersects ( R y , t ) ✫ Use duality and partition trees Data Structures for Moving Objects Center for Geometric Computing 8 R-Trees ✫ Bounding box hierarchy, B-tree ✫ Each node v is associated with a subset S v of points and the smallest rectangle R v containing S v ✫ Partition S v into B clusters, each associated with a child of v ✫ Several heuristics are proposed for partitioning S v into B clusters R1 R2 G F R1 R5 E R3 R4 R5 R6 B H A I R3 A B C D E F G H I R2 C D R4 Data Structures for Moving Objects Center for Geometric Computing 9

  6. STAR-Tree ✫ Kinetic R-tree ✫ Maintain the smallest box enclosing the set of moving points • Box is defined by four points • The combinatorial structure can change Ω( n ) times B(t) • Maintain an approximation of the small- est enclosing box ✫ Maintaining the clustering kinetically • Extend the known heuristics • No theoretical nontrivial results known on kinetic clustering Data Structures for Moving Objects Center for Geometric Computing 10 Smallest Enclosing Box ✫ R ( P ( t )) : Smallest box enclosing P at time t ✫ ε -core-set: C ⊆ S ε -coreset if ∀ t (1 − ε ) R ( S ( t )) ⊆ R ( C ( t )) Theorem: ∃ ε -core-set of size 1 / √ ε ; Computation time: n + 1 /ε A more general result on core sets in [A., Har-Peled, Varadarajan] Leads to approximatation algorithms for several problems Data Structures for Moving Objects Center for Geometric Computing 11

  7. Smallest Enclosing Box 1 1 0.99 0.99 0.98 0.98 0.97 Quality Quality 0.97 0.96 0.96 0.95 0.95 0.94 Kernel Size = 16 Kernel Size = 16 Kernel Size = 32 Kernel Size = 28 0.93 0.94 −10 −5 0 5 10 −10 −5 0 5 10 Time Time 18 Linear Motion, Kernel Size = 24 11000 Linear Motion, Input Size = 10,000 16 Quadratic Motion, Kernel Size = 27 10000 Quadratic Motion, Input Size = 10,000 14 9000 12 8000 # Events 7000 10 # Events 6000 8 5000 6 4000 4 3000 2 2000 0 1000 −10 −5 0 5 10 −10 −5 0 5 10 Time Time Data Structures for Moving Objects Center for Geometric Computing 12 Smallest Enclosing Box STAR-tree: Maintain a box enclosing S v at each node v ✫ Compute C v ⊂ S v for each node in a bottom-up manner • Merge the core sets computed at the children of v • Prune the merged set ✫ Maintain the smallest enclosing box R ( C v ) Data Structures for Moving Objects Center for Geometric Computing 13

  8. Re-Clustering ✫ Reorganize the children of a node if the rectangles of their children overlap a lot. u 2 u 3 u 3 w 2 u 1 w 1 v v ✫ Collect all the grandchildren of the node ✫ Reconstruct a 2-level R-tree on them Data Structures for Moving Objects Center for Geometric Computing 14 Experimental Results Synthetic Data ✫ 100,000–500,000 points inside 1000 × 1000 km 2 area with different distributions ✫ Points are inserted/deleted dynamically, at any time at least 80% points present ✫ Three range of speed: 45 km/h, 75km/h, 180 km/h 50 S1 (approx.) S1 (exact) 45 S2 (approx.) 200 S2 (exact) 40 S3 (approx.) 180 S3 (exact) 35 160 Search I/O 30 140 25 120 Search I/O 20 100 80 15 60 10 40 5 20 0 100 150 200 250 300 0 Time 100 150 200 250 300 350 400 450 500 Number of points (x 1000) Data Structures for Moving Objects Center for Geometric Computing 15

  9. Experimental Results Realistic Data ✫ Extracted the roads map around Durham, NC, within 120 miles cen- tered at Durham ( ≈ 250 , 000 polygonal chains) ✫ Computed a planar map of the road network ✫ Chose source and destinations randomly with some distribution ✫ Computed a good path using Dijkstra’s algorithm — minimize the length + number of turns ✫ Used Douglas Peucker algorithm to simplify the paths Data Structures for Moving Objects Center for Geometric Computing 16 Experimental Results 20 18 16 14 12 Avg. Query I/O 10 8 6 4 2 0 50 100 150 200 250 300 Time Data Structures for Moving Objects Center for Geometric Computing 17

  10. Tradeoffs in Performance ✫ Accuracy vs efficiency • Maintain approximate structures ✫ Query vs events • Combine KDS and time-oblivious approaches ✫ Time Responsive Approach: • Near-future queries are more critical than far-future queries • Fast query time for near-future queries • Measure future by the number of events occurred � • # events: ∆ , query: ∆ /n + k Data Structures for Moving Objects Center for Geometric Computing 18 Concluding Remarks ✫ Incorporating more realistic motions • Use dynamic systems, e.g., Kalman, particle filters, to model tra- jectories • How does one perform geometric computation in this model? • Geometric computation under uncertainty ✫ Hierarchical representation of motion ✫ Kinetic data structure for clustering, similarity searching Data Structures for Moving Objects Center for Geometric Computing 19

Recommend


More recommend