Skip to content

Commit 8ea26d8

Browse files
willschlitzerMeghan Jonesseisman
authored
Add missing aliases to sphdistance (#1516)
Co-authored-by: Meghan Jones <[email protected]> Co-authored-by: Dongdong Tian <[email protected]>
1 parent 6f930ac commit 8ea26d8

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

pygmt/src/sphdistance.py

+40
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@
1616

1717
@fmt_docstring
1818
@use_alias(
19+
C="single_form",
20+
D="duplicate",
21+
E="quantity",
1922
G="outgrid",
2023
I="spacing",
24+
L="unit",
25+
N="node_table",
26+
Q="voronoi",
2127
R="region",
2228
V="verbose",
2329
)
@@ -50,7 +56,41 @@ def sphdistance(data=None, x=None, y=None, **kwargs):
5056
{I}
5157
{R}
5258
{V}
59+
single_form : bool
60+
For large data sets you can save some memory (at the expense of more
61+
processing) by only storing one form of location coordinates
62+
(geographic or Cartesian 3-D vectors) at any given time, translating
63+
from one form to the other when necessary [Default keeps both arrays
64+
in memory]. Not applicable with ``voronoi``.
65+
duplicate : bool
66+
Used to skip duplicate points since the algorithm cannot handle them.
67+
[Default assumes there are no duplicates].
68+
quantity : str
69+
**d**\|\ **n**\|\ **z**\ [*dist*].
70+
Specify the quantity that should be assigned to the grid nodes [Default
71+
is **d**]:
5372
73+
- **d** - compute distances to the nearest data point
74+
- **n** - assign the ID numbers of the Voronoi polygons that each
75+
grid node is inside
76+
- **z** - assign all nodes inside the polygon the z-value of the center
77+
node fot a natural nearest-neighbor grid.
78+
79+
Optionally, append the resampling interval along Voronoi arcs in
80+
spherical degrees.
81+
unit : str
82+
Specify the unit used for distance calculations. Choose among **d**
83+
(spherical degree), **e** (m), **f** (feet), **k** (km), **M**
84+
(mile), **n** (nautical mile) or **u** survey foot.
85+
node_table : str
86+
Read the information pertaining to each Voronoi
87+
polygon (the unique node lon, lat and polygon area) from a separate
88+
file [Default acquires this information from the ASCII segment
89+
headers of the output file]. Required if binary input via `voronoi`
90+
is used.
91+
voronoi : str
92+
Append the name of a file with pre-calculated Voronoi polygons
93+
[Default performs the Voronoi construction on input data].
5494
Returns
5595
-------
5696
ret: xarray.DataArray or None

0 commit comments

Comments
 (0)