Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

apivirtdatasets.sh 802 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  1. #!/usr/bin/env bash
  2. #
  3. # Originated via https://github.com/GenericMappingTools/gmt/issues/5890
  4. #
  5. # Test case where we pass two separate datasets as virtual files
  6. # to a module. The API used to only allow one virtual dataset
  7. # when read as dataset (but many if read rec-by-rec).
  8. # Create two crossing lines:
  9. gmt project -C22/49 -E-90/-20 -G10 -Q > I1.txt
  10. gmt project -C0/-60 -E-90/-10 -G10 -Q > I2.txt
  11. # Compute the crossing on command line:
  12. gmt spatial I1.txt I2.txt -Fl -Ie > answer.txt
  13. # Same but via API and virtual files via GMT_IS_REFERENCE:
  14. testapi_spatial result_ref.txt
  15. diff -q --strip-trailing-cr result_ref.txt answer.txt > fail
  16. # Same but via API and virtual files via GMT_IS_DUPLICATE:
  17. testapi_spatial result_dup.txt -duplicate
  18. diff -q --strip-trailing-cr result_dup.txt answer.txt >> fail
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...