gmt 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/ext/gmt/gmt.c +160 -18
  3. data/lib/gmt.rb +188 -23
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb3e6c00f7441e68367685e8e81ae9ab37d7b7df
4
- data.tar.gz: 607921342ff51b589eb0a45cd29338f9b7103c67
3
+ metadata.gz: 95a8003af67677af616118eca5328e10c509cb84
4
+ data.tar.gz: 58224d0ff46be31e78016d23a4173afd334b996e
5
5
  SHA512:
6
- metadata.gz: bc29e208845fd2506a567ec89baf60b561a20df1fad75fd23b6b20c06692e224e69b5181175494e294678fe2cfbb1b28fceffa67222ec06533ce1904f10740a0
7
- data.tar.gz: 078abee21e2518de7647b0c070ee5ddc57e7b11190b2a026d8f4873069841a0c81721e87a2daa7b72120f94b9c2248b5f366d67634eca9d5f8355c9aa1c0057d
6
+ metadata.gz: 47e480dfdfe0c27b70e727d39e5e362a004fc760d0b80018390baee247b7ecc08ed3683d4da48cc467d556a742f537537330e82436f7d7612780487e40c201da
7
+ data.tar.gz: 82e1c0d38739842d0d7ba33dd5239c7eece6b13532f55d830ef338f6b5e43d82a87dd7750eb2817ffce819f8f10fe61012083e93af397d874be9e726ff1fd877
@@ -118,15 +118,6 @@ GMT_FUN(blockmode)
118
118
  GMT_FUN(filter1d)
119
119
  GMT_FUN(grdfilter)
120
120
 
121
- /* Mathematical Operations on Tables or Grids */
122
-
123
- GMT_FUN(gmtmath)
124
- GMT_FUN(makecpt)
125
- GMT_FUN(spectrum1d)
126
- GMT_FUN(sph2grd)
127
- GMT_FUN(sphdistance)
128
- GMT_FUN(sphtriangulate)
129
-
130
121
  /* Plotting of 1-D and 2-D Data */
131
122
 
132
123
  GMT_FUN(gmtlogo)
@@ -149,6 +140,86 @@ GMT_FUN(pswiggle)
149
140
  GMT_FUN(psxy)
150
141
  GMT_FUN(psxyz)
151
142
 
143
+ /* Gridding of Data Tables */
144
+
145
+ GMT_FUN(greenspline)
146
+ GMT_FUN(nearneighbor)
147
+ GMT_FUN(sphinterpolate)
148
+ GMT_FUN(surface)
149
+ GMT_FUN(triangulate)
150
+
151
+ /* Sampling of 1-D and 2-D Data */
152
+
153
+ GMT_FUN(gmtsimplify)
154
+ GMT_FUN(grdsample)
155
+ GMT_FUN(grdtrack)
156
+ GMT_FUN(sample1d)
157
+
158
+ /* Projection and Map-transformation */
159
+
160
+ GMT_FUN(grdproject)
161
+ GMT_FUN(mapproject)
162
+ GMT_FUN(project)
163
+
164
+ /* Retrieve Information */
165
+
166
+ GMT_FUN(gmtdefaults)
167
+ GMT_FUN(gmtget)
168
+ GMT_FUN(gmtinfo)
169
+ GMT_FUN(gmtset)
170
+ GMT_FUN(grdinfo)
171
+
172
+ /* Mathematical Operations on Tables or Grids */
173
+
174
+ GMT_FUN(gmtmath)
175
+ GMT_FUN(makecpt)
176
+ GMT_FUN(spectrum1d)
177
+ GMT_FUN(sph2grd)
178
+ GMT_FUN(sphdistance)
179
+ GMT_FUN(sphtriangulate)
180
+
181
+ /* Convert or Extract Subsets of Data */
182
+
183
+ GMT_FUN(gmtconnect)
184
+ GMT_FUN(gmtconvert)
185
+ GMT_FUN(gmtselect)
186
+ GMT_FUN(gmtspatial)
187
+ GMT_FUN(gmtvector)
188
+ GMT_FUN(grd2rgb)
189
+ GMT_FUN(grd2xyz)
190
+ GMT_FUN(grdblend)
191
+ GMT_FUN(grdconvert)
192
+ GMT_FUN(grdcut)
193
+ GMT_FUN(grdpaste)
194
+ GMT_FUN(splitxyz)
195
+ GMT_FUN(xyz2grd)
196
+
197
+ /* Determine Trends in 1-D and 2-D Data */
198
+
199
+ GMT_FUN(fitcircle)
200
+ GMT_FUN(gmtregress)
201
+ GMT_FUN(trend1d)
202
+ GMT_FUN(trend2d)
203
+
204
+ /* Other Operations on 2-D Grids */
205
+
206
+ GMT_FUN(grd2cpt)
207
+ GMT_FUN(grdclip)
208
+ GMT_FUN(grdedit)
209
+ GMT_FUN(grdfft)
210
+ GMT_FUN(grdgradient)
211
+ GMT_FUN(grdhisteq)
212
+ GMT_FUN(grdlandmask)
213
+ GMT_FUN(grdmask)
214
+ GMT_FUN(grdmath)
215
+ GMT_FUN(grdvolume)
216
+
217
+ /* Miscellaneous Tools */
218
+
219
+ GMT_FUN(gmt2kml)
220
+ GMT_FUN(kml2gmt)
221
+ GMT_FUN(psconvert)
222
+
152
223
  #undef GMT_FUN
153
224
 
154
225
  void Init_gmt(void)
@@ -167,15 +238,6 @@ void Init_gmt(void)
167
238
  rb_define_private_method(cGMT, "filter1d_c", gmt_filter1d, -1);
168
239
  rb_define_private_method(cGMT, "grdfilter_c", gmt_grdfilter, -1);
169
240
 
170
- /* Mathematical Operations on Tables or Grids */
171
-
172
- rb_define_private_method(cGMT, "gmtmath_c", gmt_gmtmath, -1);
173
- rb_define_private_method(cGMT, "makecpt_c", gmt_makecpt, -1);
174
- rb_define_private_method(cGMT, "spectrum1d_c", gmt_spectrum1d, -1);
175
- rb_define_private_method(cGMT, "sph2grd_c", gmt_sph2grd, -1);
176
- rb_define_private_method(cGMT, "sphdistance_c", gmt_sphdistance, -1);
177
- rb_define_private_method(cGMT, "sphtriangulate_c", gmt_sphtriangulate, -1);
178
-
179
241
  /* Plotting of 1-D and 2-D Data */
180
242
 
181
243
  rb_define_private_method(cGMT, "gmtlogo_c", gmt_gmtlogo, -1);
@@ -197,4 +259,84 @@ void Init_gmt(void)
197
259
  rb_define_private_method(cGMT, "pswiggle_c", gmt_pswiggle, -1);
198
260
  rb_define_private_method(cGMT, "psxy_c", gmt_psxy, -1);
199
261
  rb_define_private_method(cGMT, "psxyz_c", gmt_psxyz, -1);
262
+
263
+ /* Gridding of Data Tables */
264
+
265
+ rb_define_private_method(cGMT, "greenspline_c", gmt_greenspline, -1);
266
+ rb_define_private_method(cGMT, "nearneighbor_c", gmt_nearneighbor, -1);
267
+ rb_define_private_method(cGMT, "sphinterpolate_c", gmt_sphinterpolate, -1);
268
+ rb_define_private_method(cGMT, "surface_c", gmt_surface, -1);
269
+ rb_define_private_method(cGMT, "triangulate_c", gmt_triangulate, -1);
270
+
271
+ /* Sampling of 1-D and 2-D Data */
272
+
273
+ rb_define_private_method(cGMT, "gmtsimplify_c", gmt_gmtsimplify, -1);
274
+ rb_define_private_method(cGMT, "grdsample_c", gmt_grdsample, -1);
275
+ rb_define_private_method(cGMT, "grdtrack_c", gmt_grdtrack, -1);
276
+ rb_define_private_method(cGMT, "sample1d_c", gmt_sample1d, -1);
277
+
278
+ /* Projection and Map-transformation */
279
+
280
+ rb_define_private_method(cGMT, "grdproject_c", gmt_grdproject, -1);
281
+ rb_define_private_method(cGMT, "mapproject_c", gmt_mapproject, -1);
282
+ rb_define_private_method(cGMT, "project_c", gmt_project, -1);
283
+
284
+ /* Retrieve Information */
285
+
286
+ rb_define_private_method(cGMT, "gmtdefaults_c", gmt_gmtdefaults, -1);
287
+ rb_define_private_method(cGMT, "gmtget_c", gmt_gmtget, -1);
288
+ rb_define_private_method(cGMT, "gmtinfo_c", gmt_gmtinfo, -1);
289
+ rb_define_private_method(cGMT, "gmtset_c", gmt_gmtset, -1);
290
+ rb_define_private_method(cGMT, "grdinfo_c", gmt_grdinfo, -1);
291
+
292
+ /* Mathematical Operations on Tables or Grids */
293
+
294
+ rb_define_private_method(cGMT, "gmtmath_c", gmt_gmtmath, -1);
295
+ rb_define_private_method(cGMT, "makecpt_c", gmt_makecpt, -1);
296
+ rb_define_private_method(cGMT, "spectrum1d_c", gmt_spectrum1d, -1);
297
+ rb_define_private_method(cGMT, "sph2grd_c", gmt_sph2grd, -1);
298
+ rb_define_private_method(cGMT, "sphdistance_c", gmt_sphdistance, -1);
299
+ rb_define_private_method(cGMT, "sphtriangulate_c", gmt_sphtriangulate, -1);
300
+
301
+ /* Convert or Extract Subsets of Data */
302
+
303
+ rb_define_private_method(cGMT, "gmtconnect_c", gmt_gmtconnect, -1);
304
+ rb_define_private_method(cGMT, "gmtconvert_c", gmt_gmtconvert, -1);
305
+ rb_define_private_method(cGMT, "gmtselect_c", gmt_gmtselect, -1);
306
+ rb_define_private_method(cGMT, "gmtspatial_c", gmt_gmtspatial, -1);
307
+ rb_define_private_method(cGMT, "gmtvector_c", gmt_gmtvector, -1);
308
+ rb_define_private_method(cGMT, "grd2rgb_c", gmt_grd2rgb, -1);
309
+ rb_define_private_method(cGMT, "grd2xyz_c", gmt_grd2xyz, -1);
310
+ rb_define_private_method(cGMT, "grdblend_c", gmt_grdblend, -1);
311
+ rb_define_private_method(cGMT, "grdconvert_c", gmt_grdconvert, -1);
312
+ rb_define_private_method(cGMT, "grdcut_c", gmt_grdcut, -1);
313
+ rb_define_private_method(cGMT, "grdpaste_c", gmt_grdpaste, -1);
314
+ rb_define_private_method(cGMT, "splitxyz_c", gmt_splitxyz, -1);
315
+ rb_define_private_method(cGMT, "xyz2grd_c", gmt_xyz2grd, -1);
316
+
317
+ /* Determine Trends in 1-D and 2-D Data */
318
+
319
+ rb_define_private_method(cGMT, "fitcircle_c", gmt_fitcircle, -1);
320
+ rb_define_private_method(cGMT, "gmtregress_c", gmt_gmtregress, -1);
321
+ rb_define_private_method(cGMT, "trend1d_c", gmt_trend1d, -1);
322
+ rb_define_private_method(cGMT, "trend2d_c", gmt_trend2d, -1);
323
+
324
+ /* Other Operations on 2-D Grids */
325
+
326
+ rb_define_private_method(cGMT, "grd2cpt_c", gmt_grd2cpt, -1);
327
+ rb_define_private_method(cGMT, "grdclip_c", gmt_grdclip, -1);
328
+ rb_define_private_method(cGMT, "grdedit_c", gmt_grdedit, -1);
329
+ rb_define_private_method(cGMT, "grdfft_c", gmt_grdfft, -1);
330
+ rb_define_private_method(cGMT, "grdgradient_c", gmt_grdgradient, -1);
331
+ rb_define_private_method(cGMT, "grdhisteq_c", gmt_grdhisteq, -1);
332
+ rb_define_private_method(cGMT, "grdlandmask_c", gmt_grdlandmask, -1);
333
+ rb_define_private_method(cGMT, "grdmask_c", gmt_grdmask, -1);
334
+ rb_define_private_method(cGMT, "grdmath_c", gmt_grdmath, -1);
335
+ rb_define_private_method(cGMT, "grdvolume_c", gmt_grdvolume, -1);
336
+
337
+ /* Miscellaneous Tools */
338
+
339
+ rb_define_private_method(cGMT, "gmt2kml_c", gmt_gmt2kml, -1);
340
+ rb_define_private_method(cGMT, "kml2gmt_c", gmt_kml2gmt, -1);
341
+ rb_define_private_method(cGMT, "psconvert_c", gmt_psconvert, -1);
200
342
  }
data/lib/gmt.rb CHANGED
@@ -163,7 +163,7 @@ class GMT
163
163
 
164
164
  public
165
165
 
166
- ### Filtering of 1-D and 2-D Data
166
+ # @!group Filtering of 1-D and 2-D Data
167
167
 
168
168
  # L2 (x,y,z) table data filter/decimator
169
169
  wrapper_other :blockmean
@@ -181,28 +181,7 @@ class GMT
181
181
  wrapper_other :grdfilter
182
182
 
183
183
 
184
- ### Mathematical Operations on Tables or Grids
185
-
186
- # Mathematical operations on table data
187
- wrapper_other :gmtmath
188
-
189
- # Make color palette tables
190
- wrapper_other :makecpt
191
-
192
- # Compute various spectral estimates from time-series
193
- wrapper_other :spectrum1d
194
-
195
- # Compute grid from spherical harmonic coefficients
196
- wrapper_other :sph2grd
197
-
198
- # Make grid of distances to nearest points on a sphere
199
- wrapper_other :sphdistance
200
-
201
- # Delaunay or Voronoi construction of spherical lon,lat data
202
- wrapper_other :sphtriangulate
203
-
204
-
205
- ### Plotting of 1-D and 2-D Data
184
+ # @!group Plotting of 1-D and 2-D Data
206
185
 
207
186
  # Plot the GMT logo on maps
208
187
  wrapper_ps :gmtlogo
@@ -261,6 +240,192 @@ class GMT
261
240
  # Plot symbols, polygons, and lines in 3-D
262
241
  wrapper_ps :psxyz
263
242
 
243
+
244
+ # @!group Gridding of Data Tables
245
+
246
+ # Interpolation with Green’s functions for splines in 1–3 D
247
+ wrapper_other :greenspline
248
+
249
+ # Nearest-neighbor gridding scheme
250
+ wrapper_other :nearneighbor
251
+
252
+ # Spherical gridding in tension of data on a sphere
253
+ wrapper_other :sphinterpolate
254
+
255
+ # A continuous curvature gridding algorithm
256
+ wrapper_other :surface
257
+
258
+ # Perform optimal Delauney triangulation and gridding
259
+ wrapper_other :triangulate
260
+
261
+
262
+ # @!group Sampling of 1-D and 2-D Data
263
+
264
+ # Line reduction using the Douglas-Peucker algorithm
265
+ wrapper_other :gmtsimplify
266
+
267
+ # Resample a 2-D gridded data set onto a new grid
268
+ wrapper_other :grdsample
269
+
270
+ # Sampling of 2-D gridded data set(s) along 1-D track
271
+ wrapper_other :grdtrack
272
+
273
+ # Resampling of 1-D table data sets
274
+ wrapper_other :sample1d
275
+
276
+
277
+ # @!group Projection and Map-transformation
278
+
279
+ # Project gridded data sets onto a new coordinate system
280
+ wrapper_other :grdproject
281
+
282
+ # Transformation of coordinate systems for table data
283
+ wrapper_other :mapproject
284
+
285
+ # Project table data onto lines or great circles
286
+ wrapper_other :project
287
+
288
+
289
+ # @!group Retrieve Information
290
+
291
+ # List the current default settings
292
+ wrapper_other :gmtdefaults
293
+
294
+ # Retrieve selected parameters in current file
295
+ wrapper_other :gmtget
296
+
297
+ # Get information about table data files
298
+ wrapper_other :gmtinfo
299
+
300
+ # Change selected parameters in current file
301
+ wrapper_other :gmtset
302
+
303
+ # Get information about grid files
304
+ wrapper_other :grdinfo
305
+
306
+
307
+ # @!group Mathematical Operations on Tables or Grids
308
+
309
+ # Mathematical operations on table data
310
+ wrapper_other :gmtmath
311
+
312
+ # Make color palette tables
313
+ wrapper_other :makecpt
314
+
315
+ # Compute various spectral estimates from time-series
316
+ wrapper_other :spectrum1d
317
+
318
+ # Compute grid from spherical harmonic coefficients
319
+ wrapper_other :sph2grd
320
+
321
+ # Make grid of distances to nearest points on a sphere
322
+ wrapper_other :sphdistance
323
+
324
+ # Delaunay or Voronoi construction of spherical lon,lat data
325
+ wrapper_other :sphtriangulate
326
+
327
+
328
+ # @!group Convert or Extract Subsets of Data
329
+
330
+ # Connect segments into more complete lines or polygons
331
+ wrapper_other :gmtconnect
332
+
333
+ # Convert data tables from one format to another
334
+ wrapper_other :gmtconvert
335
+
336
+ # Select subsets of table data based on multiple spatial criteria
337
+ wrapper_other :gmtselect
338
+
339
+ # Geospatial operations on lines and polygons
340
+ wrapper_other :gmtspatial
341
+
342
+ # Operations on Cartesian vectors in 2-D and 3-D
343
+ wrapper_other :gmtvector
344
+
345
+ # Convert Sun raster or grid file to red, green, blue component grids
346
+ wrapper_other :grd2rgb
347
+
348
+ # Conversion from 2-D grid file to table data
349
+ wrapper_other :grd2xyz
350
+
351
+ # Blend several partially over-lapping grid files onto one grid
352
+ wrapper_other :grdblend
353
+
354
+ # Converts grid files into other grid formats
355
+ wrapper_other :grdconvert
356
+
357
+ # Cut a sub-region from a grid file
358
+ wrapper_other :grdcut
359
+
360
+ # Paste together grid files along a common edge
361
+ wrapper_other :grdpaste
362
+
363
+ # Split xyz files into several segments
364
+ wrapper_other :splitxyz
365
+
366
+ # Convert an equidistant table xyz file to a 2-D grid file
367
+ wrapper_other :xyz2grd
368
+
369
+
370
+ # @!group Determine Trends in 1-D and 2-D Data
371
+
372
+ # Finds the best-fitting great or small circle for a set of points
373
+ wrapper_other :fitcircle
374
+
375
+ # Linear regression of 1-D data sets
376
+ wrapper_other :gmtregress
377
+
378
+ # Fits polynomial or Fourier trends to y = f(x) series
379
+ wrapper_other :trend1d
380
+
381
+ # Fits polynomial trends to z = f(x,y) series
382
+ wrapper_other :trend2d
383
+
384
+
385
+ # @!group Other Operations on 2-D Grids
386
+
387
+ # Make color palette table from a grid files
388
+ wrapper_other :grd2cpt
389
+
390
+ # Limit the z-range in gridded data sets
391
+ wrapper_other :grdclip
392
+
393
+ # Modify header information in a 2-D grid file
394
+ wrapper_other :grdedit
395
+
396
+ # Perform operations on grid files in the frequency domain
397
+ wrapper_other :grdfft
398
+
399
+ # Compute directional gradient from grid files
400
+ wrapper_other :grdgradient
401
+
402
+ # Histogram equalization for grid files
403
+ wrapper_other :grdhisteq
404
+
405
+ # Create masking grid files from shoreline data base
406
+ wrapper_other :grdlandmask
407
+
408
+ # Reset grid nodes in/outside a clip path to constants
409
+ wrapper_other :grdmask
410
+
411
+ # Mathematical operations on grid files
412
+ wrapper_other :grdmath
413
+
414
+ # Calculate volumes under a surface within specified contour
415
+ wrapper_other :grdvolume
416
+
417
+
418
+ # @!group Miscellaneous Tools
419
+
420
+ # Like psxy but plots KML for use in Google Earth
421
+ wrapper_other :gmt2kml
422
+
423
+ # Extracts coordinates from Google Earth KML files
424
+ wrapper_other :kml2gmt
425
+
426
+ # Crop and convert PostScript files to raster images, EPS, and PDF
427
+ wrapper_other :psconvert
428
+
264
429
  end
265
430
 
266
431
  require 'gmt/gmt'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.J. Green