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

sphtriangulate.rst 4.9 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
  1. .. index:: ! sphtriangulate
  2. .. include:: module_core_purpose.rst_
  3. **************
  4. sphtriangulate
  5. **************
  6. |sphtriangulate_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt sphtriangulate** [ *table* ] [ |-A| ] [ |-C| ] [ |-D| ]
  11. [ |-L|\ *unit* ] [ |-N|\ *file* ] [ |-Q|\ **d**\|\ **v** ]
  12. [ |-T| ] [ |SYN_OPT-V| ]
  13. [ |SYN_OPT-b| ]
  14. [ |SYN_OPT-d| ]
  15. [ |SYN_OPT-e| ]
  16. [ |SYN_OPT-h| ]
  17. [ |SYN_OPT-i| ]
  18. [ |SYN_OPT-j| ]
  19. [ |SYN_OPT-qi| ]
  20. [ |SYN_OPT-:| ]
  21. [ |SYN_OPT--| ]
  22. |No-spaces|
  23. Description
  24. -----------
  25. **sphtriangulate** reads one or more ASCII [or binary] files (or
  26. standard input) containing lon, lat and performs a spherical Delaunay
  27. triangulation, i.e., it determines how the points should be connected to give
  28. the most equilateral triangulation possible on the sphere. Optionally,
  29. you may choose **-Qv** which will do further processing to obtain the
  30. Voronoi polygons. Normally, either set of polygons will be written as
  31. closed fillable segment output; use **-T** to write unique arcs instead. As an
  32. option, compute the area of each triangle or polygon. The algorithm used
  33. is STRIPACK.
  34. Required Arguments
  35. ------------------
  36. None.
  37. Optional Arguments
  38. ------------------
  39. .. |Add_intables| unicode:: 0x20 .. just an invisible code
  40. .. include:: explain_intables.rst_
  41. .. _-A:
  42. **-A**
  43. Compute the area of the spherical triangles (**-Qd**) or polygons
  44. (**-Qv**) and write the areas (in chosen units; see **-L**) in the
  45. output segment headers [no areas calculated].
  46. .. _-C:
  47. **-C**
  48. For large data set you can save some memory (at the expense of more
  49. processing) by only storing one form of location coordinates
  50. (geographic or Cartesian 3-D vectors) at any given time, translating
  51. from one form to the other when necessary [Default keeps both arrays in memory].
  52. .. _-D:
  53. **-D**
  54. Used to skip the last (repeated) input vertex at the end
  55. of a closed segment if it equals the first point in the segment.
  56. [Default uses all points].
  57. .. _-L:
  58. **-L**\ *unit*
  59. Specify the unit used for distance and area calculations. Choose
  60. among **e** (m), **f** (foot), **k** (km), **m** (mile), **n**
  61. (nautical mile), **u** (survey foot), or **d** (spherical degree). A
  62. spherical approximation is used unless **-je** is set,
  63. in which case we convert latitudes to authalic
  64. latitudes before calculating areas. When degree is selected the
  65. areas are given in steradians.
  66. .. _-N:
  67. **-N**\ *file*
  68. Write the information pertaining to each polygon. For Delaunay: the
  69. three node number and the triangle area (if **-A** was set); for
  70. Voronoi the unique node lon, lat and polygon area (if **-A** was
  71. set)) to a separate file. This information is also encoded in the
  72. segment headers of ASCII output files. Required if binary output is needed.
  73. .. _-Q:
  74. **-Q**\ **d**\|\ **v**
  75. Append **d** for Delaunay triangles or **v** for Voronoi polygons [Delaunay].
  76. If **-bo** is used then **-N** may be used to specify a separate file where the
  77. polygon information normally is written.
  78. .. _-T:
  79. **-T**
  80. Write the unique arcs of the construction [Default writes fillable
  81. triangles or polygons]. When used with **-A** we store arc length in
  82. the segment header in chosen unit (see **-L**).
  83. .. _-V:
  84. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  85. .. include:: explain_-V.rst_
  86. .. |Add_-bi| replace:: [Default is 2 input columns].
  87. .. include:: explain_-bi.rst_
  88. .. |Add_-bo| replace:: [Default is same as input].
  89. .. include:: explain_-bo.rst_
  90. .. |Add_-d| unicode:: 0x20 .. just an invisible code
  91. .. include:: explain_-d.rst_
  92. .. |Add_-e| unicode:: 0x20 .. just an invisible code
  93. .. include:: explain_-e.rst_
  94. .. |Add_-h| unicode:: 0x20 .. just an invisible code
  95. .. include:: explain_-h.rst_
  96. .. include:: explain_-qi.rst_
  97. .. include:: explain_distcalc.rst_
  98. .. include:: explain_colon.rst_
  99. .. |Add_nodereg| unicode:: 0x20 .. just an invisible code
  100. .. include:: explain_nodereg.rst_
  101. .. include:: explain_help.rst_
  102. .. include:: explain_precision.rst_
  103. Examples
  104. --------
  105. .. include:: explain_example.rst_
  106. .. include:: oneliner_info.rst_
  107. To create a spherical triangulation from the remote data set hotspots.txt and
  108. then plot it on a sphere, try::
  109. gmt sphtriangulate @hotspots.txt -Qd -T | gmt plot -Rg -JG-120/-30/7i -Bafg -W3p -pdf map
  110. To triangulate the points in the file testdata.txt, and make a Voronoi
  111. diagram via :doc:`plot`, use
  112. ::
  113. gmt sphtriangulate testdata.txt -Qv | gmt plot -Rg -JG30/30/6i -L -W1p -Bag -pdf testdata
  114. To compute the optimal Delaunay triangulation network based on the
  115. multiple segment file globalnodes.txt and save the area of each triangle
  116. in the header record, try
  117. ::
  118. gmt sphtriangulate globalnodes.txt -Qd -A > global_tri.txt
  119. See Also
  120. --------
  121. :doc:`gmt`,
  122. :doc:`triangulate`,
  123. :doc:`sphdistance`
  124. References
  125. ----------
  126. Renka, R, J., 1997, Algorithm 772: STRIPACK: Delaunay Triangulation and
  127. Voronoi Diagram on the Surface of a Sphere, *AMC Trans. Math. Software*,
  128. **23**\ (3), 416-434.
Tip!

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

Comments

Loading...