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

Incorrect distance calculation / can't express box in Western Hemisphere? #262

Closed
Quafadas opened this issue May 25, 2021 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Quafadas
Copy link

val innerBox: RTreeEntry[String] = entry[String](17.84f, -67.38f, 18.62f, -65.51f, "innerBox")

innerBox.asJson.toString()

val h_latitude = 18.0f
val h_longditude = -74.3f

SphericalEarth.distanceCalculator.distance(h_latitude, h_longditude, innerBox)

This produces an answer of zero, which I think is "wrong" (or at least, not what I want)

what I think is happening, is that the -ve longitude constraint is going "the wrong way" around the world. However, I can't switch the numbers around, because the library complains at me.

Any hint on how this might work?

@plokhotnyuk plokhotnyuk added the bug Something isn't working label May 25, 2021
@plokhotnyuk
Copy link
Owner

@Quafadas Thank you for the reporting! Please peek the v0.11.7 release with a fix: https://github.com/plokhotnyuk/rtree2d/releases/tag/v0.11.7

@Quafadas
Copy link
Author

Works great - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants