-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow inserting Point entries #5
Comments
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The R-tree should allow storing points in addition to rectangles.
When implementing
query
, aPoint
type was added to allow querying the R-tree using a point location (instead of a rectangle). It seems expected that if one can query using a point, one should be able to store an entry usingPoint
also.The initial thought is that
RTreeBase.insert
should accept aLocation
(which can be eitherPoint
orRect
), instead ofRect
(which is the only type it accepts currently). Whether something likePoint(3, 5)
then gets converted to a degenerate rectangle such asRect(3, 5, 3, 5)
so it works with the existing algorithms unchanged, or whether the algorithms need to be adjusted, is something that needs to be investigated.Using a "degenerate" rectangle such as
Rect(1, 1, 1, 1)
with the current code does not work withquery
, and currently results in unexpected behavior:Proper handling of "degenerate" rectangles will be handled in #6.
The text was updated successfully, but these errors were encountered: