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

Distance between points given in geodetic coordinates #172

Merged
merged 17 commits into from
Sep 15, 2020

Conversation

santisoler
Copy link
Member

Add function to compute the Euclidean distance between two points given in geodetic coordinates.
The new function makes use of the closed-form formula given by Vajda (2004).
Add test function that compares the distance between two points, with the same distance computed by converting them to a spherical coordinate system and then using the distance_spherical function.

Fixes #154

Reminders:

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst and the base __init__.py file for the package.
  • Write detailed docstrings for all functions/classes/methods. It often helps to design better code if you write the docstrings first.
  • If adding new functionality, add an example to the docstring, gallery, and/or tutorials.
  • Add your full name, affiliation, and ORCID (optional) to the AUTHORS.md file (if you haven't already) in case you'd like to be listed as an author on the Zenodo archive of the next release.

@santisoler santisoler changed the title Distance between points given in geodetic coordinates WIP Distance between points given in geodetic coordinates Jul 8, 2020
@santisoler
Copy link
Member Author

santisoler commented Jul 8, 2020

The function relies on the boule.Ellipsoid._prime_vertical_radius() method from fatiando/boule#35.
Until that PR is not merged and a new release of Boule available, CIs will fail.

Copy link
Member

@leouieda leouieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@santisoler thanks for getting this started! Left a few quick comments here.

doc/references.rst Outdated Show resolved Hide resolved
harmonica/forward/utils.py Outdated Show resolved Hide resolved
harmonica/forward/utils.py Outdated Show resolved Hide resolved
harmonica/forward/utils.py Outdated Show resolved Hide resolved
@santisoler santisoler requested a review from leouieda July 9, 2020 15:50
Copy link
Member

@leouieda leouieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments and this should be good to go once Boule 0.2 is out 👍

harmonica/forward/utils.py Outdated Show resolved Hide resolved
harmonica/forward/utils.py Outdated Show resolved Hide resolved
santisoler and others added 4 commits July 10, 2020 10:39
Co-authored-by: Leonardo Uieda <[email protected]>
Co-authored-by: Leonardo Uieda <[email protected]>
Disable the pylint error on function that involve mathematical
computations that need the definition of several variables to make them
more efficient.
@santisoler santisoler changed the title WIP Distance between points given in geodetic coordinates Distance between points given in geodetic coordinates Jul 16, 2020
@santisoler santisoler requested a review from leouieda July 16, 2020 15:34
@santisoler santisoler merged commit 70935f6 into master Sep 15, 2020
@santisoler santisoler deleted the geodetic-distance branch September 15, 2020 14:06
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.

Compute distances in geodetic coordinates
2 participants