Hierarchical Voronoi diagrams for spatial data indexing and paging Christopher Gold Dept. Computing & Mathematics, University of Glamorgan, Pontypridd CF37 1DL Wales UK
Introduction The Voronoi diagram (VD) partitions space into cells whose interior points are closest to the generating point The Delaunay triangulation (DT) is the dual of this – its edges connect generators that have adjacent cells We can walk through either by using simple geometric tests and following the VD or DT edges
The Problem Hierarchies are desirable for rapid searching, paging large data sets, etc. We walk through the higher level cells to find the one containing the desired location, drop to the next level and continue at a finer resolution BUT: The VD cannot be made directly into a hierarchy – lower level cells will not fit exactly into higher level cells
Two Voronoi levels
Spatial Indexing Traditionally we have a coarse grid whose cells contain finer details Quad-trees: the map is subdivided into hierarchical rectangles as points are added Spherical trees: triangles on the sphere Our approach: Christaller hierarchy (administrative optimization model)
Christaller hierarchy
“FastWalk” This implies that a cell is within a higher level index cell if its generator is inside We can “walk” from cell to cell as described before, then drop down to the next level and continue Each index generator has a pointer down to some child generator in the index cell This gives a logarithmic search time
Three-level Voronoi hierarchy
Three levels of Voronoi cells
Index Generators Any desired method may be used to get generators at the index level - They may be sampled from the lower level generators - They may be on a grid - They may be random Special care is needed if an index cell is nearly empty These principles are enough to give fast access to data entirely stored in memory
Data Structures Edge structures are preferable for navigating through a level as they allow direct walking rather than searching within individual triangles, etc. We use the Quad-Edge data structure as it stores both the primal and the dual links We walk along the edges to locate points Index generators have “down” pointers giving access to a more detailed level
The Quad-Edge data structure TQuad (Type of one quad) N : TQuad (N points to the next Edge/ Face) R : TQuad (R points to the next ¼ Edge (TQuad)) V : TPoint (V points to the vertices/ faces)
Make Edge function Quad.MakeEdge(Pt1, Pt2 : Point) : Quad; var Q1, Q2, Q3, Q4 : Quad; begin Q1 := Quad.Create;Q2 := Quad.Create; Q3 := Quad.Create;Q4 := Quad.Create; {create four new 1/4 branches for the edges} Q1.R := Q2;Q3.R := Q3; Q3.R := Q4;Q4.R := Q1; {four branches link together} Q1.N := Q1;Q3.N := Q4; Q3.N := Q3;Q4.N := Q2; {link Q1 and Q3 to themselves, Q2 and Q4 link to each other} Q1.Org := Pt1;Q1.Dest := Pt2; Q3.Org := Pt2;Q3.Dest := Pt1; Result := Q1; {link pointer to vertices} end; Make-Edge
Splice procedure Quad.Splice (a, b); {where a, b are input Quad-Edges} var Alpha, Beta, An, Bn. Aln, Ben : Quad; begin {get neighboring edges : Alpha and Beta in Guibas and Stolfi} Alpha := A.N.R; Beta := B.N.R; An := A.N; Bn := B.N; Aln := Alpha.N; Ben := Beta.N; {reconnect the four pointers} A.N := Bn;B.N := An; Alpha.N := Ben;Beta.N := Aln; end; Delete Edge procedure Quad.DeleteEdge (e); begin e.R.R.R.Free;e.R.R.Free; e.R.Free;e.Free; {Release Memory when deleting edge} end;
Paging Spatial indexing is straightforward; paging is harder if our structure is split into disc pages However, the same approach may be used: Each index cell contains one page When searching we walk along the index level and then drop down to a page To allow crossing from one page to the next we keep duplicates of the edges that cross to the next page, one on each side
Page Boundaries When walking through the structure we locate a vertex at an index level and move down to a page To continue, or to find its neighbours, we may leave that page: we detect this as the other end point of the edge is on another disc page Walking to the end point on the other page (via the index level) gives us the edge connectivity The same approach may be used for parallel processing This method puts spatially adjacent points on the same disc page – a very important principle
Paged Walk
Moving Points Data structures may be maintained by dynamic point insertion and deletion, and by kinetic point movement. These operations, along with the “Walk” algorithm, may be performed on the paged structure.
The dynamic point VD and DT Point insertion using incremental algorithm Point deletion – inverse process using Devilliers algorithm
Kinetic moving-points
Applications Christaller administration optimization Image boundaries Terrain modelling and generalization Lidar data processing LOD (Level Of Detail) of terrain Paging/indexing of large triangulations
Boundary approximation
Voronoi cells of some generators
Raw Lidar data
Voronoi cell approximation
Terrain Visualization and Level of Detail (LOD) Different LOD with distance from viewpoint Different LOD with relief (roughness) Similar to standard LOD with several levels precomputed
Terrain model – level 0
Level 1 generators
Level 2 generators
Overlapping level 0 and level 1
Overlapping level 1 and level 2
Conclusions and Acknowledgements This is a general purpose hierarchy that uses the existing topology structures It provides a coherent paging scheme – nearby points are on the same page It follows the standard Voronoi proximal model, and fast indexing methods