Calculating the Height of an R-Tree: Where Did I Go Wrong?

30 Views Asked by At

I've been trying to calculate the height of an R-tree after inserting my data set (I am using this library in python). Based on my understanding, I've attempted to use the properties of the index to calculate the height, but the results don't seem right.

Here's the data and the method I used:

internalNode_capacity = 100
pagesize = 4096
fanout = 113

n = len(LandPolygons) # The size of my dataset
M = internalNode_capacity
L = leaf_capacity

h = 1 # Starting with the leaf level
while n > L * (M ** (h - 1)):
h += 1

print("Height of r-tree:", h)

When using a dataset of about one million polygons, I consistently get a height of 2, which doesn't seem right. Could someone help me identify where I might be making an error, or offer insights on how the height should be correctly calculated?

Any help or pointers would be much appreciated!

0

There are 0 best solutions below