gmt 0.1.6 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gmt/gmt.c +131 -39
- data/lib/gmt.rb +75 -55
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c3d9adf57be499c296fab1aa6c6c23d1001d17709f96c0cfc62d5a3fa344a66
|
4
|
+
data.tar.gz: e51bafc40060577b2bc98a376dcc23b863e586697122e28335582ac0ffea522b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29d50bccf9a8868617653da560a520e2af073e81dcd8a99e75086f4108abfd6516f4a08073cadad8d78b60687434c06032299708b5dac9c674a09c2b5fdf9ed1
|
7
|
+
data.tar.gz: 8f57a9db15bd3a1d5afbd899af330632e6fc72fec26c64c5ba64781ec939d42cc502a07b9d373ce02e1874e423d607dab608735d155b360130a66c81a3746ec4
|
data/ext/gmt/gmt.c
CHANGED
@@ -106,7 +106,17 @@ static VALUE gmt_simple(const char *name, int argc, VALUE *argv, VALUE self)
|
|
106
106
|
return Qtrue;
|
107
107
|
}
|
108
108
|
|
109
|
-
/*
|
109
|
+
/*
|
110
|
+
The GMT functions
|
111
|
+
|
112
|
+
We take this list from the GMT documentation for the "classic mode"
|
113
|
+
https://docs.generic-mapping-tools.org/latest/modules-classic.html
|
114
|
+
|
115
|
+
The "modern mode" modules (which have a slicker way of routing and
|
116
|
+
combining postscript output) will probably need a different treatment,
|
117
|
+
possibly a more attractive on from the Ruby perspective; for now we
|
118
|
+
just limit ourselves to the classic mode.
|
119
|
+
*/
|
110
120
|
|
111
121
|
#define GMT_FUN(name) \
|
112
122
|
static VALUE gmt_ ## name (int argc, VALUE *argv, VALUE self) \
|
@@ -114,15 +124,7 @@ static VALUE gmt_ ## name (int argc, VALUE *argv, VALUE self) \
|
|
114
124
|
return gmt_simple(#name, argc, argv, self); \
|
115
125
|
}
|
116
126
|
|
117
|
-
/*
|
118
|
-
|
119
|
-
GMT_FUN(blockmean)
|
120
|
-
GMT_FUN(blockmedian)
|
121
|
-
GMT_FUN(blockmode)
|
122
|
-
GMT_FUN(filter1d)
|
123
|
-
GMT_FUN(grdfilter)
|
124
|
-
|
125
|
-
/* Plotting of 1-D and 2-D Data */
|
127
|
+
/* Plotting */
|
126
128
|
|
127
129
|
GMT_FUN(gmtlogo)
|
128
130
|
GMT_FUN(grdcontour)
|
@@ -152,7 +154,23 @@ GMT_FUN(pssolar)
|
|
152
154
|
GMT_FUN(psternary)
|
153
155
|
#endif
|
154
156
|
|
155
|
-
|
157
|
+
#if API_AT_LEAST(6, 0, 0)
|
158
|
+
GMT_FUN(psevents)
|
159
|
+
#endif
|
160
|
+
|
161
|
+
/* Filtering */
|
162
|
+
|
163
|
+
GMT_FUN(blockmean)
|
164
|
+
GMT_FUN(blockmedian)
|
165
|
+
GMT_FUN(blockmode)
|
166
|
+
GMT_FUN(filter1d)
|
167
|
+
GMT_FUN(grdfilter)
|
168
|
+
|
169
|
+
#if API_AT_LEAST(6, 0, 0)
|
170
|
+
GMT_FUN(dimfilter)
|
171
|
+
#endif
|
172
|
+
|
173
|
+
/* Gridding */
|
156
174
|
|
157
175
|
GMT_FUN(greenspline)
|
158
176
|
GMT_FUN(nearneighbor)
|
@@ -160,20 +178,24 @@ GMT_FUN(sphinterpolate)
|
|
160
178
|
GMT_FUN(surface)
|
161
179
|
GMT_FUN(triangulate)
|
162
180
|
|
163
|
-
|
181
|
+
#if API_AT_LEAST(6, 1, 0)
|
182
|
+
GMT_FUN(grdinterpolate)
|
183
|
+
#endif
|
184
|
+
|
185
|
+
/* Sampling of 1-D and 2-D data */
|
164
186
|
|
165
187
|
GMT_FUN(gmtsimplify)
|
166
188
|
GMT_FUN(grdsample)
|
167
189
|
GMT_FUN(grdtrack)
|
168
190
|
GMT_FUN(sample1d)
|
169
191
|
|
170
|
-
/* Projection and
|
192
|
+
/* Projection and map-transformation */
|
171
193
|
|
172
194
|
GMT_FUN(grdproject)
|
173
195
|
GMT_FUN(mapproject)
|
174
196
|
GMT_FUN(project)
|
175
197
|
|
176
|
-
/*
|
198
|
+
/* Information retrieval */
|
177
199
|
|
178
200
|
GMT_FUN(gmtdefaults)
|
179
201
|
GMT_FUN(gmtget)
|
@@ -181,7 +203,11 @@ GMT_FUN(gmtinfo)
|
|
181
203
|
GMT_FUN(gmtset)
|
182
204
|
GMT_FUN(grdinfo)
|
183
205
|
|
184
|
-
|
206
|
+
#if API_AT_LEAST(6, 3, 0)
|
207
|
+
GMT_FUN(grdselect)
|
208
|
+
#endif
|
209
|
+
|
210
|
+
/* Mathematical operations on tables or grids */
|
185
211
|
|
186
212
|
GMT_FUN(gmtmath)
|
187
213
|
GMT_FUN(makecpt)
|
@@ -190,14 +216,17 @@ GMT_FUN(sph2grd)
|
|
190
216
|
GMT_FUN(sphdistance)
|
191
217
|
GMT_FUN(sphtriangulate)
|
192
218
|
|
193
|
-
/* Convert or
|
219
|
+
/* Convert or extract subsets of data */
|
220
|
+
|
221
|
+
#if API_AT_LEAST(6, 2, 0)
|
222
|
+
GMT_FUN(gmtbinstats)
|
223
|
+
#endif
|
194
224
|
|
195
225
|
GMT_FUN(gmtconnect)
|
196
226
|
GMT_FUN(gmtconvert)
|
197
227
|
GMT_FUN(gmtselect)
|
198
228
|
GMT_FUN(gmtspatial)
|
199
229
|
GMT_FUN(gmtvector)
|
200
|
-
GMT_FUN(grd2rgb)
|
201
230
|
GMT_FUN(grd2xyz)
|
202
231
|
GMT_FUN(grdblend)
|
203
232
|
GMT_FUN(grdconvert)
|
@@ -206,14 +235,24 @@ GMT_FUN(grdpaste)
|
|
206
235
|
GMT_FUN(splitxyz)
|
207
236
|
GMT_FUN(xyz2grd)
|
208
237
|
|
209
|
-
|
238
|
+
#if API_AT_LEAST(6, 0, 0)
|
239
|
+
GMT_FUN(grd2kml)
|
240
|
+
#else
|
241
|
+
GMT_FUN(grd2rgb) /* https://github.com/GenericMappingTools/gmt/pull/425 */
|
242
|
+
#endif
|
243
|
+
|
244
|
+
/* trends in 1-D and 2-D data */
|
210
245
|
|
211
246
|
GMT_FUN(fitcircle)
|
212
247
|
GMT_FUN(gmtregress)
|
213
248
|
GMT_FUN(trend1d)
|
214
249
|
GMT_FUN(trend2d)
|
215
250
|
|
216
|
-
|
251
|
+
#if API_AT_LEAST(6, 0, 0)
|
252
|
+
GMT_FUN(grdtrend)
|
253
|
+
#endif
|
254
|
+
|
255
|
+
/* Grid operations */
|
217
256
|
|
218
257
|
GMT_FUN(grd2cpt)
|
219
258
|
GMT_FUN(grdclip)
|
@@ -226,12 +265,24 @@ GMT_FUN(grdmask)
|
|
226
265
|
GMT_FUN(grdmath)
|
227
266
|
GMT_FUN(grdvolume)
|
228
267
|
|
229
|
-
|
268
|
+
#if API_AT_LEAST(6, 0, 0)
|
269
|
+
GMT_FUN(grdfill)
|
270
|
+
#endif
|
271
|
+
|
272
|
+
#if API_AT_LEAST(6, 1, 0)
|
273
|
+
GMT_FUN(grdmix)
|
274
|
+
#endif
|
275
|
+
|
276
|
+
/* Miscellaneous */
|
230
277
|
|
231
278
|
GMT_FUN(gmt2kml)
|
232
279
|
GMT_FUN(kml2gmt)
|
233
280
|
GMT_FUN(psconvert)
|
234
281
|
|
282
|
+
#if API_AT_LEAST(6, 1, 0)
|
283
|
+
GMT_FUN(grdgdal)
|
284
|
+
#endif
|
285
|
+
|
235
286
|
#undef GMT_FUN
|
236
287
|
|
237
288
|
#define RB_DPM(name) rb_define_private_method(cGMT, #name "_c", gmt_ ## name, -1)
|
@@ -244,15 +295,7 @@ void Init_gmt(void)
|
|
244
295
|
rb_define_method(cGMT, "initialize", gmt_init, 0);
|
245
296
|
rb_define_method(cGMT, "free", gmt_release, 0);
|
246
297
|
|
247
|
-
/*
|
248
|
-
|
249
|
-
RB_DPM(blockmean);
|
250
|
-
RB_DPM(blockmedian);
|
251
|
-
RB_DPM(blockmode);
|
252
|
-
RB_DPM(filter1d);
|
253
|
-
RB_DPM(grdfilter);
|
254
|
-
|
255
|
-
/* Plotting of 1-D and 2-D Data */
|
298
|
+
/* Plotting */
|
256
299
|
|
257
300
|
RB_DPM(gmtlogo);
|
258
301
|
RB_DPM(grdcontour);
|
@@ -282,7 +325,23 @@ void Init_gmt(void)
|
|
282
325
|
RB_DPM(psternary);
|
283
326
|
#endif
|
284
327
|
|
285
|
-
|
328
|
+
#if API_AT_LEAST(6, 0, 0)
|
329
|
+
RB_DPM(psevents);
|
330
|
+
#endif
|
331
|
+
|
332
|
+
/* Filtering */
|
333
|
+
|
334
|
+
RB_DPM(blockmean);
|
335
|
+
RB_DPM(blockmedian);
|
336
|
+
RB_DPM(blockmode);
|
337
|
+
RB_DPM(filter1d);
|
338
|
+
RB_DPM(grdfilter);
|
339
|
+
|
340
|
+
#if API_AT_LEAST(6, 0, 0)
|
341
|
+
RB_DPM(dimfilter);
|
342
|
+
#endif
|
343
|
+
|
344
|
+
/* Gridding */
|
286
345
|
|
287
346
|
RB_DPM(greenspline);
|
288
347
|
RB_DPM(nearneighbor);
|
@@ -290,20 +349,24 @@ void Init_gmt(void)
|
|
290
349
|
RB_DPM(surface);
|
291
350
|
RB_DPM(triangulate);
|
292
351
|
|
293
|
-
|
352
|
+
#if API_AT_LEAST(6, 1, 0)
|
353
|
+
RB_DPM(grdinterpolate);
|
354
|
+
#endif
|
355
|
+
|
356
|
+
/* Sampling of 1-D and 2-D data */
|
294
357
|
|
295
358
|
RB_DPM(gmtsimplify);
|
296
359
|
RB_DPM(grdsample);
|
297
360
|
RB_DPM(grdtrack);
|
298
361
|
RB_DPM(sample1d);
|
299
362
|
|
300
|
-
/* Projection and
|
363
|
+
/* Projection and map-transformation */
|
301
364
|
|
302
365
|
RB_DPM(grdproject);
|
303
366
|
RB_DPM(mapproject);
|
304
367
|
RB_DPM(project);
|
305
368
|
|
306
|
-
/*
|
369
|
+
/* Information retrieval */
|
307
370
|
|
308
371
|
RB_DPM(gmtdefaults);
|
309
372
|
RB_DPM(gmtget);
|
@@ -311,7 +374,11 @@ void Init_gmt(void)
|
|
311
374
|
RB_DPM(gmtset);
|
312
375
|
RB_DPM(grdinfo);
|
313
376
|
|
314
|
-
|
377
|
+
#if API_AT_LEAST(6, 3, 0)
|
378
|
+
RB_DPM(grdselect);
|
379
|
+
#endif
|
380
|
+
|
381
|
+
/* Mathematical operations on tables or grids */
|
315
382
|
|
316
383
|
RB_DPM(gmtmath);
|
317
384
|
RB_DPM(makecpt);
|
@@ -320,14 +387,17 @@ void Init_gmt(void)
|
|
320
387
|
RB_DPM(sphdistance);
|
321
388
|
RB_DPM(sphtriangulate);
|
322
389
|
|
323
|
-
/* Convert or
|
390
|
+
/* Convert or extract subsets of data */
|
391
|
+
|
392
|
+
#if API_AT_LEAST(6, 2, 0)
|
393
|
+
RB_DPM(gmtbinstats);
|
394
|
+
#endif
|
324
395
|
|
325
396
|
RB_DPM(gmtconnect);
|
326
397
|
RB_DPM(gmtconvert);
|
327
398
|
RB_DPM(gmtselect);
|
328
399
|
RB_DPM(gmtspatial);
|
329
400
|
RB_DPM(gmtvector);
|
330
|
-
RB_DPM(grd2rgb);
|
331
401
|
RB_DPM(grd2xyz);
|
332
402
|
RB_DPM(grdblend);
|
333
403
|
RB_DPM(grdconvert);
|
@@ -336,14 +406,24 @@ void Init_gmt(void)
|
|
336
406
|
RB_DPM(splitxyz);
|
337
407
|
RB_DPM(xyz2grd);
|
338
408
|
|
339
|
-
|
409
|
+
#if API_AT_LEAST(6, 0, 0)
|
410
|
+
RB_DPM(grd2kml);
|
411
|
+
#else
|
412
|
+
RB_DPM(grd2rgb); /* https://github.com/GenericMappingTools/gmt/pull/425 */
|
413
|
+
#endif
|
414
|
+
|
415
|
+
/* Trends in 1-D and 2-D data */
|
340
416
|
|
341
417
|
RB_DPM(fitcircle);
|
342
418
|
RB_DPM(gmtregress);
|
343
419
|
RB_DPM(trend1d);
|
344
420
|
RB_DPM(trend2d);
|
345
421
|
|
346
|
-
|
422
|
+
#if API_AT_LEAST(6, 0, 0)
|
423
|
+
RB_DPM(grdtrend);
|
424
|
+
#endif
|
425
|
+
|
426
|
+
/* Grid operations */
|
347
427
|
|
348
428
|
RB_DPM(grd2cpt);
|
349
429
|
RB_DPM(grdclip);
|
@@ -356,12 +436,24 @@ void Init_gmt(void)
|
|
356
436
|
RB_DPM(grdmath);
|
357
437
|
RB_DPM(grdvolume);
|
358
438
|
|
359
|
-
|
439
|
+
#if API_AT_LEAST(6, 0, 0)
|
440
|
+
RB_DPM(grdfill);
|
441
|
+
#endif
|
442
|
+
|
443
|
+
#if API_AT_LEAST(6, 1, 0)
|
444
|
+
RB_DPM(grdmix);
|
445
|
+
#endif
|
446
|
+
|
447
|
+
/* Miscellaneous */
|
360
448
|
|
361
449
|
RB_DPM(gmt2kml);
|
362
450
|
RB_DPM(kml2gmt);
|
363
451
|
RB_DPM(psconvert);
|
364
452
|
|
453
|
+
#if API_AT_LEAST(6, 1, 0)
|
454
|
+
RB_DPM(grdgdal);
|
455
|
+
#endif
|
456
|
+
|
365
457
|
/* version constants */
|
366
458
|
|
367
459
|
rb_define_const(cGMT, "VERSION_MAJOR", INT2NUM(GMT_MAJOR_VERSION));
|
data/lib/gmt.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# This class provides a native extension accessing the programs of
|
2
|
-
# the {
|
2
|
+
# the {https://docs.generic-mapping-tools.org Generic Mapping Tools};
|
3
3
|
# an open source collection of about 80 command-line tools for
|
4
4
|
# manipulating geographic and Cartesian data sets (including filtering,
|
5
5
|
# trend fitting, gridding, projecting, etc.) and producing PostScript
|
@@ -13,16 +13,8 @@
|
|
13
13
|
# common = { file: 'output.ps', R: '0/3/0/2', J: 'x1i' }
|
14
14
|
#
|
15
15
|
# GMT.session do |gmt|
|
16
|
-
# gmt.psxy('dots.xy',
|
17
|
-
#
|
18
|
-
# position: :first,
|
19
|
-
# S: 'c0.50c',
|
20
|
-
# G: 'blue'))
|
21
|
-
# gmt.psxy('dots.xy',
|
22
|
-
# common.merge(
|
23
|
-
# position: :last,
|
24
|
-
# S: 'c0.25c',
|
25
|
-
# G: 'red'))
|
16
|
+
# gmt.psxy('dots.xy', position: :first, S: 'c0.50c', G: 'blue', **common)
|
17
|
+
# gmt.psxy('dots.xy', position: :last, S: 'c0.25c', G: 'red', **common)
|
26
18
|
# end
|
27
19
|
#
|
28
20
|
# Those familiar with GMT will recognise the +-R+ (range) and +-J+ (projection)
|
@@ -50,20 +42,19 @@
|
|
50
42
|
# single options hash. The options hash corresponds to the command-line
|
51
43
|
# options of the GMT program; hence the shell command
|
52
44
|
#
|
53
|
-
# gmt makecpt -Cgebco depths.txt -i2 -Z -E24 >
|
45
|
+
# gmt makecpt -Cgebco depths.txt -i2 -Z -E24 > bath.cpt
|
54
46
|
#
|
55
47
|
# would be replicated by the Ruby
|
56
48
|
#
|
57
49
|
# gmt = GMT.new
|
58
|
-
# gmt.makecpt('depths.txt',
|
59
|
-
# C: 'gebco', i: 2, Z: nil, E: 24, :> => 'my_depths.cpt')
|
50
|
+
# gmt.makecpt('depths.txt', C: 'gebco', i: 2, Z: nil, E: 24, :> => 'bath.cpt')
|
60
51
|
#
|
61
52
|
# Note that
|
62
53
|
# - the argument(s) (the input file <code>'depths.txt'</code>) preceed(s)
|
63
54
|
# the options hash
|
64
55
|
# - the options hash has keys which are symbols
|
65
56
|
# - options which lack arguments correspond to hash keys with nil values
|
66
|
-
# <code
|
57
|
+
# <code>Z: nil</code>.
|
67
58
|
# - the output redirection is _also_ treated as hash option, with key
|
68
59
|
# <code>:></code> and value which is the output file.
|
69
60
|
#
|
@@ -71,8 +62,7 @@
|
|
71
62
|
# _argument_, but recall that arguments must proceed the options hash,
|
72
63
|
# so the above would be
|
73
64
|
#
|
74
|
-
# gmt.makecpt('depths.txt',
|
75
|
-
# :Z, C: 'gebco', i: 2, E: 24, :> => 'my_depths.cpt')
|
65
|
+
# gmt.makecpt('depths.txt', :Z, C: 'gebco', i: 2, E: 24, :> => 'bath.cpt')
|
76
66
|
#
|
77
67
|
# using this format.
|
78
68
|
#
|
@@ -84,17 +74,17 @@
|
|
84
74
|
# and error-prone on the command-line, and more so in the "options hash"
|
85
75
|
# representation in the Ruby module.
|
86
76
|
#
|
87
|
-
# So we add some
|
77
|
+
# So we add some syntactic sugar for these PostScript functions: if the
|
88
78
|
# options hash has the keys +:position+ (with values one of +:first+, +:middle+,
|
89
79
|
# or +:last+) and +:file+ (with the value of the ouptut file), then the
|
90
80
|
# +-O+ and +-K+ options and the output redirection are handled by the class.
|
91
81
|
# So one might write
|
92
82
|
#
|
93
83
|
# gmt = GMT.new
|
94
|
-
# gmt.psbasemap(
|
95
|
-
# gmt.pstext(
|
96
|
-
# gmt.psxy(
|
97
|
-
# gmt.pslogo(
|
84
|
+
# gmt.psbasemap( ..., file: 'map.ps', position: :first)
|
85
|
+
# gmt.pstext( ..., file: 'map.ps', position: :middle)
|
86
|
+
# gmt.psxy( ..., file: 'map.ps', position: :middle)
|
87
|
+
# gmt.pslogo( ..., file: 'map.ps', position: :last)
|
98
88
|
#
|
99
89
|
class GMT
|
100
90
|
|
@@ -142,7 +132,7 @@ class GMT
|
|
142
132
|
# @param [Array<String>] files The input files
|
143
133
|
# @param [Hash] options The GMT command-line options in hash form
|
144
134
|
# @return [Boolean] +true+ on success
|
145
|
-
# @see
|
135
|
+
# @see https://docs.generic-mapping-tools.org/latest/$1.html
|
146
136
|
def wrapper_ps(method)
|
147
137
|
define_method(method) do |*args, **opts|
|
148
138
|
args, opts = arg_opt_normalise(args, opts)
|
@@ -157,7 +147,7 @@ class GMT
|
|
157
147
|
# @param [Array<String>] arguments The arguments
|
158
148
|
# @param [Hash] options The GMT command-line options in hash form
|
159
149
|
# @return [Boolean] +true+ on success
|
160
|
-
# @see
|
150
|
+
# @see https://docs.generic-mapping-tools.org/latest/$1.html
|
161
151
|
def wrapper_other(method)
|
162
152
|
define_method(method) do |*args, **opts|
|
163
153
|
args, opts = arg_opt_normalise(args, opts)
|
@@ -215,11 +205,11 @@ class GMT
|
|
215
205
|
file_opts =
|
216
206
|
case position
|
217
207
|
when :first, 'first'
|
218
|
-
{ :
|
208
|
+
{ K: nil, :> => file }
|
219
209
|
when :middle, 'middle'
|
220
|
-
{ :
|
210
|
+
{ O: nil, K: nil, :>> => file }
|
221
211
|
when :last, 'last'
|
222
|
-
{ :
|
212
|
+
{ O: nil, :>> => file }
|
223
213
|
else
|
224
214
|
raise ArgumentError, 'position should be :first, :middle or :last'
|
225
215
|
end
|
@@ -257,25 +247,7 @@ class GMT
|
|
257
247
|
|
258
248
|
public
|
259
249
|
|
260
|
-
# @!group
|
261
|
-
|
262
|
-
# L2 (x,y,z) table data filter/decimator
|
263
|
-
wrapper_other :blockmean
|
264
|
-
|
265
|
-
# L1 (x,y,z) table data filter/decimator
|
266
|
-
wrapper_other :blockmedian
|
267
|
-
|
268
|
-
# Mode estimate (x,y,z) table data filter/decimator
|
269
|
-
wrapper_other :blockmode
|
270
|
-
|
271
|
-
# Time domain filtering of 1-D data tables
|
272
|
-
wrapper_other :filter1d
|
273
|
-
|
274
|
-
# Filter 2-D gridded data sets in the space domain
|
275
|
-
wrapper_other :grdfilter
|
276
|
-
|
277
|
-
|
278
|
-
# @!group Plotting of 1-D and 2-D Data
|
250
|
+
# @!group Plotting
|
279
251
|
|
280
252
|
# Plot the GMT logo on maps
|
281
253
|
wrapper_ps :gmtlogo
|
@@ -340,8 +312,32 @@ class GMT
|
|
340
312
|
# Plot data on ternary diagrams
|
341
313
|
wrapper_ps :psternary
|
342
314
|
|
315
|
+
# Plot event symbols and labels for a moment in time
|
316
|
+
wrapper_ps :psevents
|
317
|
+
|
318
|
+
|
319
|
+
# @!group Filtering
|
320
|
+
|
321
|
+
# L2 (x,y,z) table data filter/decimator
|
322
|
+
wrapper_other :blockmean
|
323
|
+
|
324
|
+
# L1 (x,y,z) table data filter/decimator
|
325
|
+
wrapper_other :blockmedian
|
326
|
+
|
327
|
+
# Mode estimate (x,y,z) table data filter/decimator
|
328
|
+
wrapper_other :blockmode
|
329
|
+
|
330
|
+
# Time domain filtering of 1-D data tables
|
331
|
+
wrapper_other :filter1d
|
332
|
+
|
333
|
+
# Filter 2-D gridded data sets in the space domain
|
334
|
+
wrapper_other :grdfilter
|
335
|
+
|
336
|
+
# Directional filtering of grids in the space domain
|
337
|
+
wrapper_other :dimfilter
|
338
|
+
|
343
339
|
|
344
|
-
# @!group Gridding
|
340
|
+
# @!group Gridding
|
345
341
|
|
346
342
|
# Interpolation with Green’s functions for splines in 1–3 D
|
347
343
|
wrapper_other :greenspline
|
@@ -358,8 +354,11 @@ class GMT
|
|
358
354
|
# Perform optimal Delauney triangulation and gridding
|
359
355
|
wrapper_other :triangulate
|
360
356
|
|
357
|
+
# Interpolate 2-D grids or 1-D series from a 3-D data cube
|
358
|
+
wrapper_other :grdinterpolate
|
361
359
|
|
362
|
-
|
360
|
+
|
361
|
+
# @!group Sampling of 1-D and 2-D data
|
363
362
|
|
364
363
|
# Line reduction using the Douglas-Peucker algorithm
|
365
364
|
wrapper_other :gmtsimplify
|
@@ -374,7 +373,7 @@ class GMT
|
|
374
373
|
wrapper_other :sample1d
|
375
374
|
|
376
375
|
|
377
|
-
# @!group Projection and
|
376
|
+
# @!group Projection and map-transformation
|
378
377
|
|
379
378
|
# Project gridded data sets onto a new coordinate system
|
380
379
|
wrapper_other :grdproject
|
@@ -386,7 +385,7 @@ class GMT
|
|
386
385
|
wrapper_other :project
|
387
386
|
|
388
387
|
|
389
|
-
# @!group
|
388
|
+
# @!group Information retrieval
|
390
389
|
|
391
390
|
# List the current default settings
|
392
391
|
wrapper_other :gmtdefaults
|
@@ -403,8 +402,11 @@ class GMT
|
|
403
402
|
# Get information about grid files
|
404
403
|
wrapper_other :grdinfo
|
405
404
|
|
405
|
+
# Make selections or determine common regions from 2-D grids, images or 3-D cubes
|
406
|
+
wrapper_other :grdselect
|
407
|
+
|
406
408
|
|
407
|
-
# @!group Mathematical
|
409
|
+
# @!group Mathematical operations on tables or grids
|
408
410
|
|
409
411
|
# Mathematical operations on table data
|
410
412
|
wrapper_other :gmtmath
|
@@ -425,7 +427,10 @@ class GMT
|
|
425
427
|
wrapper_other :sphtriangulate
|
426
428
|
|
427
429
|
|
428
|
-
# @!group Convert or
|
430
|
+
# @!group Convert or extract subsets of data
|
431
|
+
|
432
|
+
# Bin spatial data and determine statistics per bin
|
433
|
+
wrapper_other :gmtbinstats
|
429
434
|
|
430
435
|
# Connect segments into more complete lines or polygons
|
431
436
|
wrapper_other :gmtconnect
|
@@ -466,8 +471,11 @@ class GMT
|
|
466
471
|
# Convert an equidistant table xyz file to a 2-D grid file
|
467
472
|
wrapper_other :xyz2grd
|
468
473
|
|
474
|
+
# Create KML image quadtree from single grid
|
475
|
+
wrapper_other :grd2kml
|
469
476
|
|
470
|
-
|
477
|
+
|
478
|
+
# @!group Trends in 1-D and 2-D data
|
471
479
|
|
472
480
|
# Finds the best-fitting great or small circle for a set of points
|
473
481
|
wrapper_other :fitcircle
|
@@ -481,8 +489,11 @@ class GMT
|
|
481
489
|
# Fits polynomial trends to z = f(x,y) series
|
482
490
|
wrapper_other :trend2d
|
483
491
|
|
492
|
+
# Fit trend surface to grids and compute residuals
|
493
|
+
wrapper_other :grdtrend
|
494
|
+
|
484
495
|
|
485
|
-
# @!group
|
496
|
+
# @!group Grid operations
|
486
497
|
|
487
498
|
# Make color palette table from a grid files
|
488
499
|
wrapper_other :grd2cpt
|
@@ -496,6 +507,9 @@ class GMT
|
|
496
507
|
# Perform operations on grid files in the frequency domain
|
497
508
|
wrapper_other :grdfft
|
498
509
|
|
510
|
+
# Interpolate across holes in a grid
|
511
|
+
wrapper_other :grdfill
|
512
|
+
|
499
513
|
# Compute directional gradient from grid files
|
500
514
|
wrapper_other :grdgradient
|
501
515
|
|
@@ -511,11 +525,14 @@ class GMT
|
|
511
525
|
# Mathematical operations on grid files
|
512
526
|
wrapper_other :grdmath
|
513
527
|
|
528
|
+
# Blending and transforming grids and images
|
529
|
+
wrapper_other :grdmix
|
530
|
+
|
514
531
|
# Calculate volumes under a surface within specified contour
|
515
532
|
wrapper_other :grdvolume
|
516
533
|
|
517
534
|
|
518
|
-
# @!group Miscellaneous
|
535
|
+
# @!group Miscellaneous
|
519
536
|
|
520
537
|
# Like psxy but plots KML for use in Google Earth
|
521
538
|
wrapper_other :gmt2kml
|
@@ -526,6 +543,9 @@ class GMT
|
|
526
543
|
# Crop and convert PostScript files to raster images, EPS, and PDF
|
527
544
|
wrapper_other :psconvert
|
528
545
|
|
546
|
+
# Execute GDAL raster programs from GMT
|
547
|
+
wrapper_other :grdgdal
|
548
|
+
|
529
549
|
end
|
530
550
|
|
531
551
|
require 'gmt/gmt'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- J.J. Green
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1'
|
97
97
|
description: |
|
98
|
-
A Ruby extension for the Generic Mapping Tools (GMT5)
|
98
|
+
A Ruby extension for the Generic Mapping Tools (GMT5/6)
|
99
99
|
cartographic toolset.
|
100
100
|
email: j.j.green@gmx.co.uk
|
101
101
|
executables: []
|
@@ -128,11 +128,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements:
|
131
|
-
- GMT5 development libraries (compile)
|
132
|
-
- GMT5 installation (test)
|
131
|
+
- GMT5/6 development libraries (compile)
|
132
|
+
- GMT5/6 installation (test)
|
133
133
|
- ghostscript (test)
|
134
|
-
|
135
|
-
rubygems_version: 2.7.6
|
134
|
+
rubygems_version: 3.1.2
|
136
135
|
signing_key:
|
137
136
|
specification_version: 4
|
138
137
|
summary: Generic Mapping Tools (GMT)
|