-
Notifications
You must be signed in to change notification settings - Fork 68
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
Initial AABB
can cause from_points
/others to be wrong
#170
Comments
I think the problem is with recent changes to Line 222 in 0139255
If let aabb = AABB::from_points(&[(-0.5, -0.5)]);
println!("{:?}", aabb); // AABB { lower: (-0.5, -0.5), upper: (0.0, 0.0) } |
Good catch! That might be due to #162 (as of yet unreleased) |
Sorry for introducing that regression. I do think we should fix I think the most straight-forward implementation would be something like i.into_iter().map(Self::from_point).reduce(|mut lhs, rhs| {
lhs.merge(&rhs);
lhs
).unwrap_or(Self::new_empty()) or we could change the initial value of the |
…:new_empty (#171) - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `rstar/CHANGELOG.md` if knowledge of this change could be valuable to users. --- This method does not just need an empty AABB, but actually requires that the lower/upper corners use max/min values of the point coordinates. This change therefore open-codes this to keep these invariants and the code that relies on them close together. A changelog entry should not be necessary as we luckily did not yet release the regression. Closes #170
The lower bounds are wrong in this example on
master
:The text was updated successfully, but these errors were encountered: