From 8ea26d8fa5875a5ca5b13470c37030e0e7798e79 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Wed, 27 Oct 2021 04:17:33 +0100 Subject: [PATCH] Add missing aliases to sphdistance (#1516) Co-authored-by: Meghan Jones Co-authored-by: Dongdong Tian --- pygmt/src/sphdistance.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/pygmt/src/sphdistance.py b/pygmt/src/sphdistance.py index d2c02ca43e3..32e858db581 100644 --- a/pygmt/src/sphdistance.py +++ b/pygmt/src/sphdistance.py @@ -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]. Returns ------- ret: xarray.DataArray or None