17
17
@fmt_docstring
18
18
@use_alias (
19
19
A = "area_thresh" ,
20
+ C = "dist2pt" ,
20
21
D = "resolution" ,
22
+ F = "polygon" ,
21
23
G = "gridmask" ,
22
24
I = "reverse" ,
23
25
J = "projection" ,
26
+ L = "dist2line" ,
24
27
N = "mask" ,
25
28
R = "region" ,
26
29
V = "verbose" ,
@@ -47,9 +50,9 @@ def select(data=None, outfile=None, **kwargs):
47
50
they:
48
51
49
52
1. are inside a rectangular region (``region`` [and ``projection``])
50
- 2. are within *dist* km of any point in *pointfile*
51
- 3. are within *dist* km of any line in *linefile*
52
- 4. are inside one of the polygons in *polygonfile*
53
+ 2. are within *dist* km of any point in *pointfile* (``dist2pt``)
54
+ 3. are within *dist* km of any line in *linefile* (``dist2line``)
55
+ 4. are inside one of the polygons in *polygonfile* (``polygon``)
53
56
5. are inside geographical features (based on coastlines)
54
57
6. have z-values within a given range
55
58
7. are inside bins of a grid mask whose nodes are non-zero
@@ -69,6 +72,41 @@ def select(data=None, outfile=None, **kwargs):
69
72
outfile : str
70
73
The file name for the output ASCII file.
71
74
{area_thresh}
75
+ dist2pt : str
76
+ *pointfile*\|\ *lon*/*lat*\ **+d**\ *dist*.
77
+ Pass all records whose locations are within *dist* of any of the
78
+ points in the ASCII file *pointfile*. If *dist* is zero, the 3rd
79
+ column of *pointfile* must have each point's individual radius of
80
+ influence. If you only have a single point, you can specify
81
+ *lon*/*lat* instead of *pointfile*. Distances are Cartesian and in
82
+ user units. Alternatively, if ``region`` and ``projection`` are used,
83
+ the geographic coordinates are projected to map coordinates (in
84
+ centimeters, inches, meters, or points, as determined by
85
+ :gmt-term:`PROJ_LENGTH_UNIT`) before Cartesian distances are compared
86
+ to *dist*.
87
+ dist2line : str
88
+ *linefile*\ **+d**\ *dist*\ [**+p**].
89
+ Pass all records whose locations are within *dist* of any of the line
90
+ segments in the ASCII :gmt-docs:`multiple-segment file
91
+ <cookbook/file-formats.html#optional-segment-header-records>`
92
+ *linefile*. If *dist* is zero, we will scan each sub-header in
93
+ *linefile* for an embedded **-D**\ *dist* setting that sets each
94
+ line's individual distance value. Distances are Cartesian and in
95
+ user units. Alternatively, if ``region`` and ``projection`` are used,
96
+ the geographic coordinates are projected to map coordinates (in
97
+ centimeters, inches, meters, or points, as determined by
98
+ :gmt-term:`PROJ_LENGTH_UNIT`) before Cartesian distances are
99
+ compared to *dist*. Append **+p** to ensure only points whose
100
+ orthogonal projections onto the nearest line-segment fall within
101
+ the segment's endpoints [Default considers points "beyond" the
102
+ line's endpoints].
103
+ polygon : str
104
+ *polygonfile*.
105
+ Pass all records whose locations are within one of the closed
106
+ polygons in the ASCII :gmt-docs:`multiple-segment file
107
+ <cookbook/file-formats.html#optional-segment-header-records>`
108
+ *polygonfile*. For spherical polygons (lon, lat), make sure no
109
+ consecutive points are separated by 180 degrees or more in longitude.
72
110
resolution : str
73
111
*resolution*\ [**+f**].
74
112
Ignored unless ``mask`` is set. Selects the resolution of the coastline
0 commit comments