Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MasoumehVahedi opened this issue Aug 14, 2023 · 1 comment
Open

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

MasoumehVahedi opened this issue Aug 14, 2023 · 1 comment

Comments

@MasoumehVahedi
Copy link

MasoumehVahedi commented Aug 14, 2023

Hello all,

I've been trying to calculate the height of an R-tree after inserting my data set. 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:

leaf_capacity = 100
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!

@codeananda
Copy link
Contributor

Can you add some python code we can copy/paste that will regenerate your error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants