If in case you have been following the Spatial Index Sequence, it began with the necessity for multi-dimensional indexes and an introduction to space-filling curves, adopted by a deep dive into grid techniques (GeoHash and Google S2) and tessellation (Uber H3).
On this publish, let’s discover the R-Tree information construction (data-driven construction), which is popularly used to retailer multi-dimensional information, equivalent to information factors, segments, and rectangles.
For instance, contemplate the plan of a college format 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 greater 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 seek out all of the buildings inside (partially or totally contained) the bigger part (question rectangle).
Within the above determine, the crimson rectangle characterize the question rectangle, used to ask the…