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

grdgeovec.sh 2.1 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
33
34
35
36
37
38
39
40
41
  1. #!/usr/bin/env bash
  2. # Testing grdvectors geovector unit system with
  3. # The given vector (0,111.13) has length 111.13 which is mapped to km on the map
  4. # which are then projected to the corresponding lengths in plot units. However,
  5. # we can give other units, such as nautical or statute miles, and then these are
  6. # converted to km, yielding longer vectors for the same user lengths.
  7. ps=grdgeovec.ps
  8. gmt set MAP_VECTOR_SHAPE 0.2 MAP_FRAME_TYPE plain
  9. # First we say these are km
  10. echo -1 0 0 111.13 > t.txt
  11. echo 1 0 90 111.13 >> t.txt
  12. gmt xyz2grd -R-1/1/-1/1 -I1 -fg -Ga.grd t.txt
  13. gmt xyz2grd -R -I1 -Gr.grd -fg t.txt -i0,1,3
  14. gmt grdvector r.grd a.grd -A -JM2i -R-2/3/-2/3 -P -K -Bafg1 -BWSne -Q0.2i+e -Gblue -W2p,blue -S1k > $ps
  15. echo -1 60 0 111.13 > t.txt
  16. echo 1 60 90 111.13 >> t.txt
  17. gmt xyz2grd -R-1/1/59/61 -I1 -fg -Ga.grd t.txt
  18. gmt xyz2grd -R -I1 -fg -Gr.grd t.txt -i0,1,3
  19. gmt grdvector r.grd a.grd -A -R-2/3/58/63 -J -O -K -Q0.2i+e -Gblue -W2p,blue -S1k -Bafg1 -BWSne+t"km" -Y3.75i >> $ps
  20. # Now we say these are miles statute
  21. echo -1 0 0 111.13 > t.txt
  22. echo 1 0 90 111.13 >> t.txt
  23. gmt xyz2grd -R-1/1/-1/1 -I1 -fg -Ga.grd t.txt
  24. gmt xyz2grd -R -I1 -Gr.grd -fg t.txt -i0,1,3
  25. gmt grdvector r.grd a.grd -A -J -R-2/3/-2/3 -O -K -Bafg1 -BwSne -Q0.2i+e -Gblue -W2p,blue -S1M -X2.25i -Y-3.75i >> $ps
  26. echo -1 60 0 111.13 > t.txt
  27. echo 1 60 90 111.13 >> t.txt
  28. gmt xyz2grd -R-1/1/59/61 -I1 -fg -Ga.grd t.txt
  29. gmt xyz2grd -R -I1 -fg -Gr.grd t.txt -i0,1,3
  30. gmt grdvector r.grd a.grd -A -R-2/3/58/63 -J -O -K -Q0.2i+e -Gblue -W2p,blue -S1M -Bafg1 -BwSne+t"M" -Y3.75i >> $ps
  31. # Finally we say these are nautical milesx10 so we need a smaller scale of 0.1 unit per nm
  32. echo -1 0 0 11.113 > t.txt
  33. echo 1 0 90 11.113 >> t.txt
  34. gmt xyz2grd -R-1/1/-1/1 -I1 -fg -Ga.grd t.txt
  35. gmt xyz2grd -R -I1 -Gr.grd -fg t.txt -i0,1,3
  36. gmt grdvector r.grd a.grd -A -J -R-2/3/-2/3 -O -K -Bafg1 -BwSne -Q0.2i+e -Gblue -W2p,blue -S0.1n -X2.25i -Y-3.75i >> $ps
  37. echo -1 60 0 11.113 > t.txt
  38. echo 1 60 90 11.113 >> t.txt
  39. gmt xyz2grd -R-1/1/59/61 -I1 -fg -Ga.grd t.txt
  40. gmt xyz2grd -R -I1 -fg -Gr.grd t.txt -i0,1,3
  41. gmt grdvector r.grd a.grd -A -R-2/3/58/63 -J -O -Q0.2i+e -Gblue -W2p,blue -S0.1n -Bafg1 -BwSne+t"nm" -Y3.75i >> $ps
Tip!

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

Comments

Loading...