Skip to content

Commit 4d003de

Browse files
committed
Alias resolution (D), gridmask (G) and mask (N) for gmtselect
1 parent 7eef59f commit 4d003de

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

pygmt/src/select.py

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
@fmt_docstring
1616
@use_alias(
1717
A="area_thresh",
18-
# D="resolution",
19-
# G="gridmask",
18+
D="resolution",
19+
G="gridmask",
2020
I="reverse",
2121
J="projection",
22-
# N="mask",
22+
N="mask",
2323
R="region",
2424
V="verbose",
2525
Z="z_subregion",
@@ -35,7 +35,7 @@
3535
s="skiprows",
3636
w="wrap",
3737
)
38-
@kwargs_to_strings(R="sequence", i="sequence_comma", o="sequence_comma")
38+
@kwargs_to_strings(M="sequence", R="sequence", i="sequence_comma", o="sequence_comma")
3939
def select(data=None, outfile=None, **kwargs):
4040
r"""
4141
Select data table subsets based on multiple spatial criteria.
@@ -68,6 +68,19 @@ def select(data=None, outfile=None, **kwargs):
6868
outfile : str
6969
The file name for the output ASCII file.
7070
{A}
71+
resolution : str
72+
*resolution*\ [**+f**].
73+
Ignored unless **mask** is set. Selects the resolution of the coastline
74+
data set to use ((**f**)ull, (**h**)igh, (**i**)ntermediate, (**l**)ow,
75+
or (**c**)rude). The resolution drops off by ~80% between data sets.
76+
[Default is **l**]. Append (**+f**) to automatically select a lower
77+
resolution should the one requested not be available [Default is abort
78+
if not found]. Note that because the coastlines differ in details it is
79+
not guaranteed that a point will remain inside [or outside] when a
80+
different resolution is selected.
81+
gridmask : str
82+
Pass all locations that are inside the valid data area of the grid
83+
*gridmask*. Nodes that are outside are either NaN or zero.
7184
reverse : str
7285
[**cflrsz**].
7386
Reverses the sense of the test for each of the criteria specified:
@@ -83,6 +96,16 @@ def select(data=None, outfile=None, **kwargs):
8396
- **z** select records NOT within the range specified by
8497
**z_subregion**.
8598
{J}
99+
mask : str or list
100+
Pass all records whose location is inside specified geographical
101+
features. Specify if records should be skipped (s) or kept (k) using
102+
1 of 2 formats:
103+
104+
- *wet/dry*.
105+
- *ocean/land/lake/island/pond*.
106+
107+
[Default is s/k/s/k/s (i.e., s/k), which passes all points on dry
108+
land].
86109
{R}
87110
{V}
88111
z_subregion : str

0 commit comments

Comments
 (0)