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

Return index distance tuple in nearest_point_haversine #232

Merged

Conversation

sandorkertesz
Copy link
Collaborator

@sandorkertesz sandorkertesz commented Oct 16, 2023

geo.nearest_point_haversine() now returns a tuple of (index, distance).

>>> from earthkit.data.geo import nearest_point_haversine
>>> p_ref = (51.45, -0.97)
>>> p_lat = [44.49, 50.73, 50.1]
>>> p_lon = [11.34, 7.90, -8.1]
>>> nearest_point_haversine(p_ref, (p_lat, p_lon))
    (2, 523115.8314777661)

@sandorkertesz sandorkertesz merged commit 7a11635 into develop Oct 16, 2023
11 of 12 checks passed
@sandorkertesz sandorkertesz deleted the feature/return-index-distance-tuple-haversine branch October 16, 2023 18:25
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

Successfully merging this pull request may close these issues.

1 participant