
BoxTrees and Rtrees with NearOptimal Query Time y z x x Pankaj K Agarwal Mark de Berg Joachim Gudmundsson Mikael Hammar z Herman J Haverkort Abstract graphics spatial databases GIS and rob otics In order to exp edite and simplify the data structure a A b oxtree is a b oundingb ox hierarchy that uses window query is answered in two steps In the rst axisaligned b oxes as b ounding volumes The stab step called the ltering step each ob ject is replaced bing number of a b oxtree with resp ect to a given by the smallest b ox containing the ob ject and the type of query is the maximum number of no des vis query pro cedure computes the b ounding b oxes that ited when answering such a query We describ e sev intersect the query window Instead of b oxes other eral new algorithms to construct b oxtrees with small simple shap es such as spheres ellipsoids cylinders stabbing number with resp ect to queries with axis have also b een used The second step called the parallel b oxes and with p oints We also prove lower renement step extracts the actual ob jects among b ounds on the worstcase stabbing number for b ox these b ounding b oxes that intersect the query win trees which show that our results are optimal or close dow A few recent results show that under to optimal Finally we present algorithms to convert certain reasonable assumptions on the input ob jects b oxtrees to Rtrees resulting in Rtrees with al the number of b ounding b oxes intersecting a query most optimal stabbing number window is not much larger than the number of ob jects intersecting the window which makes this ap Introduction proach quite attractive see the pap er by Zhou and Suri and the references therein There has b een Motivation and problem statement Prepro d much work on the ltering step and we also fo cus cessing a set S of geometric ob jects in R for an on this step More precisely we wish to prepro cess swering window queriesrep ort all ob jects of S that d a set S of n drectangles in R so that all rectan intersect a query drectangle is central to many gles of S intersecting a query drectangle can b e re applications and has b een widely studied in several p orted eciently We will refer to this query as the areas including computational geometry computer rectangleintersection query A related query is the The work by PA is supp orted by Army Research Oce rectanglecontainment query in which we want to re MURI grant DAAH by a Sloan fellowship by p ort all rectangles in S that contain a query p oint NSF grants EIA EIA and CCR and by grant from the USIsraeli Binational Science Foun dation The work by HH is supp orted by the Netherlands A number of data structures with go o d provable Organization for Scientic Research NWO b ounds have b een prop osed for answering rectangle y Center for Geometric Computing Department of Com intersection queries Unfortunately they are of lim puter Science Box Duke University Durham NC ited practical use b ecause the amount of storage they USA z use is rather high O n log n storage and even O n Institute of Information and Computing Sciences Utrecht University PO Box TB Utrecht the Netherlands storage with a large hidden constant are often unac x Department of Computer Science Lund University Box ceptable Therefore in practice one usually uses sim Lund Sweden 1 pler data structures A commonly used structure for A drectangle also called a ddimensional hyperrectangle is the pro duct of d intervals a b a b answering rectangleintersection queries rectangle 1 1 d d containment queries and in fact many other types of b oundingb ox hierarchies b oth in main and external queries is the boundingbox hierarchy sometimes also memory that have low stabbing number called AABBtree this is a tree T in which each Previous results As noted ab ove several e leaf is asso ciated with a rectangle of S and each in cient data structures have b een prop osed for an terior no de is asso ciated with the smallest b ox B swering a rectangleintersection query For example enclosing all the rectangles stored at the leaves of the Chazelle showed that a compressed range tree subtree ro oted at All the rectangles of S intersect can b e used to answer a ddimensional rectangle d ing a query rectangle R are rep orted by traversing T intersection query in time O log n k using d in a topdown manner Supp ose the query pro cedure O n log nlog log n space This data structure is visiting a no de If B R there is nothing to is to o complex to b e practical even in R Since a d do If B R then it rep orts all rectangles stored d d rectangle in R can b e mapp ed to a p oint in R in subtree ro oted at Finally if B R but we can use a k dtree to construct a data structure of B R it recursively visits the children of We O n size that can answer a ddimensional rectangle say that R crosses a no de if B R and B R d intersection query in time O n k A num If the fanout of T is b ounded then the query time b er of heuristics based on k dtrees have also b een pro is prop ortional to the number of no des of T that R p osed to answer rectangleintersection queries crosses plus the number of rectangles rep orted We Several pap ers describ e how to construct call the stabbing number of T denoted S T to b oundingb ox hierarchies or other b oundingvolume b e the maximum number of its no des crossed by a hierarchies for example using spheres or k DOPs as rectangle It is therefore desirable to construct a b ounding volumes but they do not obtain b ounds b oundingb ox hierarchy with small stabbing number on the worstcase query complexity In many applications esp ecially in the database Some of the most widely used externalmemory applications the set S is to o large to t in the main b oundingb ox hierarchies are the R tree and its memory therefore it is stored on disk In that case variants An R tree originally introduced by the main goal is to minimize the number of disk ac Guttmann is a B tree each of whose leaves is cesses needed to answer a window query and the asso ciated with an input rectangle All leaves of an p erformance of an algorithm is analyzed under the R tree are at the same level the degree of all inter standard external memory mo del This mo del as nal no des except of the ro ot is b etween t and t for sumes that each disk access transmits a contiguous a given parameter t and the degree of the ro ot varies blo ck of t units of data in a single inputoutput op b etween and t We will refer to t as the mini eration or IO The eciency of a data structure mum degree of the tree Although several metho ds is measured in terms of the amount of disk space it have b een prop osed for ordering the uses measured in units of disk blo cks the number input rectangles along the leavesvarying from sim of IOs required to answer a query and the number ple heuristics to space lling curvesto minimize the of IOs need to construct the data structure In the stabbing number none of them guarantee the worst context of b oundingb ox hierarchies several schemes case p erformance In the worst case a linear number have b een prop osed that construct a tree as ab ove but of b ounding b oxes might intersect a query rectan in which the fanout of each no de dep ends on t Some gle even if it intersects only O input rectangles notable examples of externalmemory b oundingb ox The only analytical result is by Faloutsos et al hierarchies are various variants of Rtrees see the but they prove b ounds on the query time only in survey pap er We can still dene the crossing the dimensional case when the input intervals are no des and the stabbing number as earlier and one 2 Barequet et al gave an algorithm to construct a can argue that the number of IOs needed to answer 2 b oundingb ox hierarchy in R and they claimed that if the a query is prop ortional to the stabbing number plus rectangles in S are pairwise disjoint then any p oint lies in the output size O log n b ounding b oxes But the argument presented in the In this pap er we study the problem of constructing pap er has a technical problem sults to our b oxtrees we improve the result of de uniformly distributed and have at most two dierent Berg et al our query complexity do es not de lengths Recently de Berg et al describ ed an al p end on the parameter w which makes their query gorithm for construcing an R tree on rectangles in R complexity linear in the worst case and it is linear so that all k rectangles containing a query p oint b e re p in p orted in O log log n log t IOs Here is the instead of We also introduce the concept of ratio of the maximum and the minimum xlengths of semiRtrees these are similar to ordinary Rtrees the input rectangles and is the pointstabbing num the degree of each internal no de except for the ro ot ber of S that is is the maximum number of input is b etween t and t for some given parameter t rectangles containing any p oint in the plane They except that the leaves do not have to b e at the same also describ ed another algorithm for constructing an level We give a general algorithm to convert a b ox R tree that can answer a rectangleintersection query tree with small stabbing number into a semiRtrees in O log w k log n IOs where and with small stabbing number the stabbing number t are as ab ove and w is the ratio of the xlength of the obtained here is b etter than that for Rtrees This query rectangle to the smallest xlength of an input leads to semiRtrees with almost optimal stabbing rectangle number Lower Bounds Our results In this
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages11 Page
-
File Size-