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

badpols.sh 1.3 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
  1. #!/usr/bin/env bash
  2. # Test polygon wrapping when -R is not global but polygons may be
  3. # Based on issue # 949. I identified three polygon of 272 that
  4. # failed to plot: These were 31,49,78. I am keeping the original
  5. # file as well as the loop code that made individual plots in case
  6. # our fix will cause others to fail.
  7. cob=file2.gmt
  8. proj=M6i
  9. ps=badpols.ps
  10. region=-80/120/0/53
  11. gmt convert $cob -Q31 -fg > tmp
  12. area=`gmt info -fg tmp -I0.1`
  13. gmt psxy -R$region -J$proj -Glightblue -P -K tmp -Xc > $ps
  14. gmt psxy -R -J -W0.25p -O -K tmp >> $ps
  15. gmt pstext -R -J -O -K -Baf -F+cTC+jTC+f18p+t"$area" -Dj0/0.2i >> $ps
  16. region=-80/120/0/53
  17. gmt convert $cob -Q49 -fg > tmp
  18. area=`gmt info -fg tmp -I0.1`
  19. gmt psxy -R$region -J -Glightred -O -K -Y3i tmp >> $ps
  20. gmt psxy -R -J -W0.25p -O -K tmp >> $ps
  21. gmt pstext -R -J -O -K -Baf -F+cTC+jTC+f18p+t"$area" -Dj0/0.2i >> $ps
  22. region=-80/120/-72/-20
  23. gmt convert $cob -Q78 -fg > tmp
  24. area=`gmt info -fg tmp -I0.1`
  25. gmt psxy -R$region -J -Glightgreen -P -O -K -Y3i tmp >> $ps
  26. gmt convert $cob -Q78 -fg | gmt psxy -R -J -W0.25p -O -K >> $ps
  27. gmt pstext -R -J -O -Baf -F+cTC+jTC+f18p+t"$area" -Dj0/0.2i >> $ps
  28. # Loop to plot all polygons
  29. #
  30. #gmt math -T0/291/1 -o1 T = t.lis
  31. #while read no; do
  32. # ps=$no.ps
  33. # gmt convert $cob -Q$no -fg | gmt psxy -R$region -J$proj -Glightblue -V -P -Baf -V > $ps
  34. # gmt psconvert $ps -Tf -A5p -Z
  35. #done < t.lis
Tip!

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

Comments

Loading...