1

Why is it better to have a circular range query answered with an already constructed C-tree than an already constructed R-tree? (Assuming I'm correct).

It seems to be more complicated to calculate the intersection of a rectangle and a circle than a between to circles. Compare

\sqrt{max(abs(r.x - C.x) - r.length, 0)^2 + max(abs(r.y - C.y) - r.height, 0)^2}

with

\sqrt{abs(c1.x - c2.x)^2 + abs(c1.y - c2.y)^2}$

Am I right?

  • 2
    What is a C tree? Never heard of it. Intersection circle with rectangle is trivial, if you only want to know yes or no. – Has QUIT--Anony-Mousse Apr 19 '18 at 19:08
  • My guess is that it's a bounding object hierarchy similar to R-tree but with nodes represented as bounding circles instead of rectangles. Intersection of circles is trivial as well. This sqrt is not needed since you can compare with (r1+r2)^2. – Adam Wulkiewicz Jan 09 '19 at 02:28
  • I'd rather assume that more important is which shape of the nodes more closely represent the underlying geometries and "cuts out" empty space. E.g. for thin polygons it's probably better to use rectangles but for round polygons the circles would probably be better. It also depends on the distribution of the geometries. Furthermore it probably depends on the balancing algorithm, e.g. linear R-tree algorithm tends to create long and thin rectangular nodes. Circles by definition has better perimeter to area ratio than squares. This may play a role in queries. There is for sure no simple answer. – Adam Wulkiewicz Jan 09 '19 at 03:22

0 Answers0