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

add decorator to validate lonlat #109

Merged
merged 3 commits into from
Sep 14, 2023
Merged

add decorator to validate lonlat #109

merged 3 commits into from
Sep 14, 2023

Conversation

ManonMarchand
Copy link
Member

This PR add a decorator to the function taking longitudes and latitudes as parameters.

The decorator does the following:

  • check that shapes of lon and lat are compatible
  • transforms in atleast1D for compatibility with type PyReadonlyArrayDyn<f64>
  • converts to degrees in case we got an other unit in entry

This is applied to the following methods:

  • contains_lonlat
  • from_lonlat
  • from_elliptical_cone
  • from_cone
  • from_ring
  • from_polygon

It solves issues #108 and #87

@ManonMarchand ManonMarchand merged commit 8e6021e into master Sep 14, 2023
@ManonMarchand ManonMarchand deleted the lonlat-decorator branch September 14, 2023 15:28
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