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

how can i insert the points? #4

Open
mvdream opened this issue Sep 28, 2019 · 1 comment
Open

how can i insert the points? #4

mvdream opened this issue Sep 28, 2019 · 1 comment

Comments

@mvdream
Copy link

mvdream commented Sep 28, 2019

No description provided.

@adisuissa
Copy link
Contributor

Here is a short usage example:

from pyrtree import RTree,Rect

obj = [1, 2, 3] # the object we are going to add to the rtree
rtree = RTree() # tree creation

pyrtree uses the (x_min, y_min, x_max, y_max) notation

rtree.insert(obj, Rect(7, 15, 10, 20)) # element insertion with a given box

pyrtree uses the (x_min, y_min, x_max, y_max) notation

rect_res = rtree.query_rect( Rect(0, 2, 8, 17) )
for rtree_node in rect_res:
if not rtree_node.is_leaf():
continue
t = rtree_node.leaf_obj()
# t will point to obj, do something with t...

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