This article is about the data structure. For the type of metric space, see
Real tree.
| R-tree |
|---|
| Type | tree |
|---|
| Invented | 1984 |
|---|
| Invented by | Antonin Guttman |
|---|
|
| Operation |
Average |
Worst case |
|---|
| Search |
O(logMn) |
O(n) |
|---|
| Insert |
|
O(n) |
|---|
|
|
R-trees are tree data structures used for spatial access methods, i.e., for indexing multi-dimensional information such as geographical coordinates, rectangles or polygons. The R-tree was proposed by Antonin Guttman in 1984 and has found significant use in both theoretical and applied contexts. A common real-world usage for an R-tree might be to store spatial objects such as restaurant locations or the polygons that typical maps are made of: streets, buildings, outlines of lakes, coastlines, etc. and then find answers quickly to queries such as "Find all museums within 2 km of my current location", "retrieve all road segments within 2 km of my location" (to display them in a navigation system) or "find the nearest gas station" (although not taking roads into account). The R-tree can also accelerate nearest neighbor search for various distance metrics, including great-circle distance.