Opentopia Directory Encyclopedia Tools

Quadtree

Encyclopedia : Q : QU : QUA : Quadtree


The Quadtree is a tree data structure in which each internal node has up to four children. Quadtrees are most often used to partition a two dimensional space by recursively subdividing it into four quadrants or regions. The regions may be square or rectangular, or may have arbitrary shapes. This data structure was named a quadtree by Raphael Finkel and J.L. Bentley in 1974. A similar partitioning is also known as a Q-tree. All forms of Quadtrees share some common features:

Types

Quadtrees may be classified according to the type of data they represent, including areas, points, lines and curves. Quadtrees may also be classified by whether the shape of the tree is or is not independent of the order data is processed. Some common types of quadtrees are:

The Region Quadtree

The Region quadtree represents a partition of space in two dimensions by decomposing the region into four equal quadrants, subquadrants, and so on with each leaf node containing data corresponding to a specific subregion. Each node in the tree either has exactly four children, or has no children (a leaf node). The Region Quadtree is not strictly a 'tree' - as the positions of subdivisions are independent of the data they are more precisely called 'Tries'.

A region quadtree may be used to represent an image consisting of [] pixels, where each pixel value is 0 or 1. The root node represents the entire image region. If the pixels in any region are not entirely 0s or 1s, it is subdivided. In this application, each leaf node represents a block of pixels that are all 0s or all 1s.

A region quadtree may also be used as a variable resolution representation of a data field. For example, the temperatures in an area may be stored as a quadtree, with each leaf node storing the average temperature over the subregion it represents.

If a region quadtree is used to represent a set of point data (such as the latitude and longitude of a set of cities), regions are subdivided until each leaf contains at most a single point.

Point Quadtree

The Point quadtree is an adaptation of a binary tree used to represent two dimensional point data. It shares the features of all quadtrees but is a true tree as the centre of a subdivision is always on a point. The tree shape depends on the order data is processed.

Node Structure for a Point Quadtree :

  • 4 Pointers: quad [‘NW’], quad [‘NE’], quad[‘SW’], and quad[‘SE’]
  • point, of type DataPoint, which in turn contains:

Edge Quadtree

Edge Quadtrees are specifically used to store lines rather than points. Curves are approximated by subdividing cells to a very fine resolution. This can result in extremely unbalanced trees which may defeat the object of indexing.

Some common uses of quadtrees

Quadtrees are the two-dimensional analog of octrees.

See also

References

External links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: