gmt 0.0.11 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/gmt/gmt.c +81 -77
- data/lib/gmt.rb +2 -4
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e6a7a0a7dc937c57dc6c075f4c506b7c70ff314
|
4
|
+
data.tar.gz: d3e77c6aee7b31a6dcd2d4a4e07b012eb99a86ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7472840160e4d774aab02115d3c7a76781224db5b48001c35fc564e1d09073c7533a4f2b5b06cf25b4883bd7a93eb4930a9d11fb997fa75956908b52cf8d7af
|
7
|
+
data.tar.gz: 96d94b7badc20cfc8ff20f4cfde1e3eab56071aaf6ecc5fbcd50a295bedbd29caf6a07ab0716a18016613eec63f36e8c4f48deae61abb9ca295f6c0953c24342
|
data/ext/gmt/gmt.c
CHANGED
@@ -221,6 +221,8 @@ GMT_FUN(psconvert)
|
|
221
221
|
|
222
222
|
#undef GMT_FUN
|
223
223
|
|
224
|
+
#define RB_DPM(name) rb_define_private_method(cGMT, #name "_c", gmt_ ## name, -1)
|
225
|
+
|
224
226
|
void Init_gmt(void)
|
225
227
|
{
|
226
228
|
VALUE cGMT = rb_const_get(rb_cObject, rb_intern("GMT"));
|
@@ -231,111 +233,113 @@ void Init_gmt(void)
|
|
231
233
|
|
232
234
|
/* Filtering of 1-D and 2-D Data */
|
233
235
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
236
|
+
RB_DPM(blockmean);
|
237
|
+
RB_DPM(blockmedian);
|
238
|
+
RB_DPM(blockmode);
|
239
|
+
RB_DPM(filter1d);
|
240
|
+
RB_DPM(grdfilter);
|
239
241
|
|
240
242
|
/* Plotting of 1-D and 2-D Data */
|
241
243
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
244
|
+
RB_DPM(gmtlogo);
|
245
|
+
RB_DPM(grdcontour);
|
246
|
+
RB_DPM(grdimage);
|
247
|
+
RB_DPM(grdvector);
|
248
|
+
RB_DPM(grdview);
|
249
|
+
RB_DPM(psbasemap);
|
250
|
+
RB_DPM(psclip);
|
251
|
+
RB_DPM(pscoast);
|
252
|
+
RB_DPM(pscontour);
|
253
|
+
RB_DPM(pshistogram);
|
254
|
+
RB_DPM(psimage);
|
255
|
+
RB_DPM(pslegend);
|
256
|
+
RB_DPM(psmask);
|
257
|
+
RB_DPM(psrose);
|
258
|
+
RB_DPM(psscale);
|
259
|
+
RB_DPM(pstext);
|
260
|
+
RB_DPM(pswiggle);
|
261
|
+
RB_DPM(psxy);
|
262
|
+
RB_DPM(psxyz);
|
261
263
|
|
262
264
|
/* Gridding of Data Tables */
|
263
265
|
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
266
|
+
RB_DPM(greenspline);
|
267
|
+
RB_DPM(nearneighbor);
|
268
|
+
RB_DPM(sphinterpolate);
|
269
|
+
RB_DPM(surface);
|
270
|
+
RB_DPM(triangulate);
|
269
271
|
|
270
272
|
/* Sampling of 1-D and 2-D Data */
|
271
273
|
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
274
|
+
RB_DPM(gmtsimplify);
|
275
|
+
RB_DPM(grdsample);
|
276
|
+
RB_DPM(grdtrack);
|
277
|
+
RB_DPM(sample1d);
|
276
278
|
|
277
279
|
/* Projection and Map-transformation */
|
278
280
|
|
279
|
-
|
280
|
-
|
281
|
-
|
281
|
+
RB_DPM(grdproject);
|
282
|
+
RB_DPM(mapproject);
|
283
|
+
RB_DPM(project);
|
282
284
|
|
283
285
|
/* Retrieve Information */
|
284
286
|
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
287
|
+
RB_DPM(gmtdefaults);
|
288
|
+
RB_DPM(gmtget);
|
289
|
+
RB_DPM(gmtinfo);
|
290
|
+
RB_DPM(gmtset);
|
291
|
+
RB_DPM(grdinfo);
|
290
292
|
|
291
293
|
/* Mathematical Operations on Tables or Grids */
|
292
294
|
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
295
|
+
RB_DPM(gmtmath);
|
296
|
+
RB_DPM(makecpt);
|
297
|
+
RB_DPM(spectrum1d);
|
298
|
+
RB_DPM(sph2grd);
|
299
|
+
RB_DPM(sphdistance);
|
300
|
+
RB_DPM(sphtriangulate);
|
299
301
|
|
300
302
|
/* Convert or Extract Subsets of Data */
|
301
303
|
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
304
|
+
RB_DPM(gmtconnect);
|
305
|
+
RB_DPM(gmtconvert);
|
306
|
+
RB_DPM(gmtselect);
|
307
|
+
RB_DPM(gmtspatial);
|
308
|
+
RB_DPM(gmtvector);
|
309
|
+
RB_DPM(grd2rgb);
|
310
|
+
RB_DPM(grd2xyz);
|
311
|
+
RB_DPM(grdblend);
|
312
|
+
RB_DPM(grdconvert);
|
313
|
+
RB_DPM(grdcut);
|
314
|
+
RB_DPM(grdpaste);
|
315
|
+
RB_DPM(splitxyz);
|
316
|
+
RB_DPM(xyz2grd);
|
315
317
|
|
316
318
|
/* Determine Trends in 1-D and 2-D Data */
|
317
319
|
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
320
|
+
RB_DPM(fitcircle);
|
321
|
+
RB_DPM(gmtregress);
|
322
|
+
RB_DPM(trend1d);
|
323
|
+
RB_DPM(trend2d);
|
322
324
|
|
323
325
|
/* Other Operations on 2-D Grids */
|
324
326
|
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
327
|
+
RB_DPM(grd2cpt);
|
328
|
+
RB_DPM(grdclip);
|
329
|
+
RB_DPM(grdedit);
|
330
|
+
RB_DPM(grdfft);
|
331
|
+
RB_DPM(grdgradient);
|
332
|
+
RB_DPM(grdhisteq);
|
333
|
+
RB_DPM(grdlandmask);
|
334
|
+
RB_DPM(grdmask);
|
335
|
+
RB_DPM(grdmath);
|
336
|
+
RB_DPM(grdvolume);
|
335
337
|
|
336
338
|
/* Miscellaneous Tools */
|
337
339
|
|
338
|
-
|
339
|
-
|
340
|
-
|
340
|
+
RB_DPM(gmt2kml);
|
341
|
+
RB_DPM(kml2gmt);
|
342
|
+
RB_DPM(psconvert);
|
341
343
|
}
|
344
|
+
|
345
|
+
#undef RB_DPM
|
data/lib/gmt.rb
CHANGED
@@ -127,7 +127,7 @@ class GMT
|
|
127
127
|
public
|
128
128
|
|
129
129
|
# @yield [gmt] yields the {GMT} session to the block
|
130
|
-
def session
|
130
|
+
def session
|
131
131
|
yield GMT.new
|
132
132
|
end
|
133
133
|
|
@@ -188,8 +188,7 @@ class GMT
|
|
188
188
|
# convert the options hash to an array of pairs
|
189
189
|
|
190
190
|
def options_as_pairs(options)
|
191
|
-
options.
|
192
|
-
key, values = pair
|
191
|
+
options.each_with_object(Array.new) do |(key, values), result|
|
193
192
|
if values.respond_to? :each then
|
194
193
|
values.each do |value|
|
195
194
|
result << [key, string_unless_nil(value)]
|
@@ -197,7 +196,6 @@ class GMT
|
|
197
196
|
else
|
198
197
|
result << [key, string_unless_nil(values)]
|
199
198
|
end
|
200
|
-
result
|
201
199
|
end
|
202
200
|
end
|
203
201
|
|
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.0
|
4
|
+
version: 0.1.0
|
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: 2017-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,45 +30,45 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '12.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: '12.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.6'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: yard
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.9'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.9'
|
69
69
|
description: |
|
70
70
|
A Ruby extension for the Generic Mapping Tools (GMT5)
|
71
|
-
cartographic toolset
|
71
|
+
cartographic toolset.
|
72
72
|
email: j.j.green@gmx.co.uk
|
73
73
|
executables: []
|
74
74
|
extensions:
|
@@ -100,10 +100,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements:
|
103
|
-
- GMT5 development libraries
|
104
|
-
-
|
103
|
+
- GMT5 development libraries (compile)
|
104
|
+
- GMT5 installation (test)
|
105
|
+
- ghostscript (test)
|
105
106
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.5.1
|
107
108
|
signing_key:
|
108
109
|
specification_version: 4
|
109
110
|
summary: Generic Mapping Tools (GMT)
|