Question

The PMR Rectangle Quadtree is a quadtree which has an list of (Rectangle) objects in each leaf. This is called a bucket.

The structure of this quadtree is dependent on the order of inserting the elements.
The inventor of that quadtree proposed to achieve a balanced quadtree for data that are in advance known (static), that way that the (rectangles) objects to be inserted should be pre-sorted by x and y coordinates.

What exactly is meant by sorting by x and y coordinates to achieve a balanced quadtree?
Asume we take the SW corner of the rectangle, Does this mean sort by x and if equal x sort by y? Or doest it mean the first elem is the smallest x, the second the smallest y (independent of x) ?

The bible for that topic (Hanan Samet: Multidimensional and Metric Search Structures) does not explain that.

Was it helpful?

Solution

Seems to be a topic where the know how is not really widespread, I have to answer it myself:

The pre sorting order of the elements to be added to the quad tree should be in morton order. ( see also papers from Hanan Samet) The morton index calculates an int value from given two (x,y) coordinates, in a way that two coordinates close together also have little difference in their morton index.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top