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

smallcirvec.sh 1.2 KB

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
  1. #!/usr/bin/env bash
  2. #
  3. # Check geovector symbols for small circle vectors
  4. ps=smallcirvec.ps
  5. gmt set PROJ_ELLIPSOID Sphere
  6. # Vector from point with head at end
  7. cat << EOF > t.txt
  8. 0 0 8000 red 0 45 b+e+b
  9. -30 0 6000 green -30 -30 e+e+b
  10. 30 30 6000 blue 10 10 c+e+b
  11. -10 0 6671.7 yellow 80 0 c+e+b
  12. EOF
  13. gmt psbasemap -Rg -JG0/0/4.5i -Bag -P -K -Xc > $ps
  14. while read lon lat length color plon plat just; do
  15. echo $lon $lat $length | gmt psxy -R -J -W1p,$color -S=0.4i+j${just}+o${plon}/${plat}+h1 -G$color -O -K >> $ps
  16. echo $lon $lat | gmt psxy -R -J -O -K -Sc0.1i -G$color -W0.25p >> $ps
  17. echo $plon $plat | gmt psxy -R -J -O -K -St0.1i -G$color -W0.25p >> $ps
  18. done < t.txt
  19. # Vector from point with head at end
  20. cat << EOF > t.txt
  21. -20 -20 -45 30 red 5 -5 b+b
  22. 30 -30 0 60 blue -15 15 b+b+e+r
  23. 0 45 -90 180 green 0 0 b+e
  24. EOF
  25. gmt psbasemap -R -J -Bag -O -K -Y4.75i >> $ps
  26. while read lon lat angle1 angle2 color plon plat just; do
  27. echo $lon $lat $angle1 $angle2 | gmt psxy -R -J -W2p,$color -S=0.4i+j${just}+o${plon}/${plat}+q+p0.5p+h1 -G$color -O -K >> $ps
  28. echo $lon $lat | gmt psxy -R -J -O -K -Sc0.1i -G$color -W0.25p >> $ps
  29. echo $plon $plat | gmt psxy -R -J -O -K -St0.1i -G$color -W0.25p >> $ps
  30. done < t.txt
  31. gmt psxy -R -J -O -T >> $ps
Tip!

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

Comments

Loading...