When you have been following the Spatial Index Series, it began with the necessity for multi-dimensional indexes and an introduction to space-filling curves, adopted by a deep dive into grid systems (GeoHash and Google S2) and tessellation (Uber H3).
On this submit, let’s discover the R-Tree information construction (data-driven construction), which is popularly used to retailer multi-dimensional information, resembling information factors, segments, and rectangles.
For instance, take into account the plan of a college structure beneath. We are able to use the R-Tree information construction to index the buildings on the map.
To take action, we are able to place rectangles round a constructing or group of buildings after which index them. Suppose there’s a a lot larger part of the map signifying a bigger division, and we have to question all of the buildings inside a division. We are able to use the R-Tree to search out all of the buildings inside (partially or absolutely contained) the bigger part (question rectangle).
Within the above determine, the pink rectangle symbolize the question rectangle, used to ask the…