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

ph.sh 543 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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  1. #!/usr/bin/env bash
  2. # Test gmtspatial hold/perimeter function
  3. # File with polygons, some are holes, none marked or reversed
  4. ps=ph.ps
  5. cat << EOF > raw.txt
  6. > Big one
  7. 0 0
  8. 5 0
  9. 5 5
  10. 0 5
  11. > Big two
  12. 10 0
  13. 15 0
  14. 15 5
  15. 10 5
  16. > Little one1
  17. 1 1
  18. 2 1
  19. 2 2
  20. 1 2
  21. > Little two1
  22. 3 1
  23. 4 1
  24. 4 2
  25. 3 2
  26. > Little one2
  27. 11 1
  28. 12 1
  29. 12 2
  30. 11 2
  31. > Little two2
  32. 13 1
  33. 14 1
  34. 14 2
  35. 13 2
  36. EOF
  37. gmt spatial -Sh raw.txt > organized.txt
  38. gmt psxy -R-0.5/15.5/-1/6 -Jx1c -P -Baf -B+t"Original" -Gred -W1p raw.txt -K > $ps
  39. gmt psxy -R -J -Baf -Gred -W1p -B+t"Organized" organized.txt -O -Y10c >> $ps
Tip!

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

Comments

Loading...