-
Notifications
You must be signed in to change notification settings - Fork 233
Add missing aliases to sphdistance #1516
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f49a1a7
add single_form, duplicate, and quantity
willschlitzer 2a392fb
add unit, voronioi, and nodetable
willschlitzer 3ba48fd
add units
willschlitzer 17f9f53
Apply suggestions from code review
willschlitzer 4c5a7d2
Merge branch 'main' into add-params-sphdistance
willschlitzer e1b12c8
Apply suggestions from code review
willschlitzer 8ad3c1c
Merge branch 'main' into add-params-sphdistance
willschlitzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,8 +16,14 @@ | |
|
|
||
| @fmt_docstring | ||
| @use_alias( | ||
| C="single_form", | ||
| D="duplicate", | ||
| E="quantity", | ||
| G="outgrid", | ||
| I="spacing", | ||
| L="unit", | ||
| N="node_table", | ||
| Q="voronoi", | ||
| R="region", | ||
| V="verbose", | ||
| ) | ||
|
|
@@ -50,7 +56,41 @@ def sphdistance(data=None, x=None, y=None, **kwargs): | |
| {I} | ||
| {R} | ||
| {V} | ||
| single_form : bool | ||
| For large data sets you can save some memory (at the expense of more | ||
| processing) by only storing one form of location coordinates | ||
| (geographic or Cartesian 3-D vectors) at any given time, translating | ||
| from one form to the other when necessary [Default keeps both arrays | ||
| in memory]. Not applicable with ``voronoi``. | ||
| duplicate : bool | ||
| Used to skip duplicate points since the algorithm cannot handle them. | ||
| [Default assumes there are no duplicates]. | ||
| quantity : str | ||
| **d**\|\ **n**\|\ **z**\ [*dist*] | ||
| Specify the quantity that should be assigned to the grid nodes [Default | ||
| is **d**]: | ||
|
|
||
| - **d** - compute distances to the nearest data point | ||
| - **n** - assign the ID numbers of the Voronoi polygons that each | ||
| grid node is inside | ||
| - **z** - assign all nodes inside the polygon the z-value of the center | ||
| node fot a natural nearest-neighbor grid. | ||
|
|
||
| Optionally, append the resampling interval along Voronoi arcs in | ||
| spherical degrees. | ||
| unit : str | ||
| Specify the unit used for distance calculations. Choose among **d** | ||
| (spherical degree), **e** (m), **f** (feet), **k** (km), **M** | ||
| (mile), **n** (nautical mile) or **u** survey foot. | ||
| node_table : str | ||
| Read the information pertaining to each Voronoi | ||
| polygon (the unique node lon, lat and polygon area) from a separate | ||
| file [Default acquires this information from the ASCII segment | ||
| headers of the output file]. Required if binary input via `voronoi` | ||
| is used. | ||
| voronoi : str | ||
| Append the name of a file with pre-calculated Voronoi polygons | ||
| [Default performs the Voronoi construction on input data]. | ||
|
Comment on lines
+86
to
+93
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Especially one sphtriangulate is wrapped, we will need to open a separate issue to discuss how to pass these data to sphdistance from memory rather than relying on writing/reading files. |
||
| Returns | ||
| ------- | ||
| ret: xarray.DataArray or None | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.