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

gmtvector.rst 7.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
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
  1. .. index:: ! gmtvector
  2. .. include:: module_core_purpose.rst_
  3. *********
  4. gmtvector
  5. *********
  6. |gmtvector_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt vector** [ *tables* ] [ |-A|\ **m**\ [*conf*]\|\ *vector* ]
  11. [ |-C|\ [**i**\|\ **o**] ]
  12. [ |-E| ] [ |-N| ] [ |-S|\ *vector* ]
  13. [ |-T|\ **a**\|\ **d**\|\ **D**\|\ **p**\ *az*\|\ **r**\ [*arg*]\|\ **R**\|\ **s**\|\ **t**\ [*arg*]\|\ **x** ]
  14. [ |SYN_OPT-V| ]
  15. [ |SYN_OPT-b| ]
  16. [ |SYN_OPT-d| ]
  17. [ |SYN_OPT-e| ]
  18. [ |SYN_OPT-f| ]
  19. [ |SYN_OPT-g| ]
  20. [ |SYN_OPT-h| ]
  21. [ |SYN_OPT-i| ]
  22. [ |SYN_OPT-o| ]
  23. [ |SYN_OPT-q| ]
  24. [ |SYN_OPT-:| ]
  25. [ |SYN_OPT--| ]
  26. |No-spaces|
  27. Description
  28. -----------
  29. **vector** reads either (x, y), (x, y, z), (r, theta) or (lon, lat)
  30. [or (lat,lon); see **-:**] coordinates from the first 2-3 columns on
  31. standard input [or one or more *tables*]. If **-fg** is selected and only two items
  32. are read (i.e., lon, lat) then these coordinates are converted to
  33. Cartesian three-vectors on the unit sphere. Otherwise we expect (r,
  34. theta) unless **-Ci** is in effect. If no file is found we expect a
  35. single vector to be given as argument to **-A**; this argument will also
  36. be interpreted as an x/y[/z], lon/lat, or r/theta vector. The input
  37. vectors (or the one provided via **-A**) are denoted the prime
  38. vector(s). Several standard vector operations (angle between vectors,
  39. cross products, vector sums, and vector rotations) can be selected; most
  40. require a single second vector, provided via **-S**. The output vectors
  41. will be converted back to (lon, lat) or (r, theta) unless **-Co** is set
  42. which requests (x, y[, z]) Cartesian coordinates.
  43. Required Arguments
  44. ------------------
  45. None.
  46. Optional Arguments
  47. ------------------
  48. *table*
  49. One or more ASCII [or binary, see **-bi**]
  50. file containing lon,lat [lat,lon if **-:**] values in the first 2
  51. columns (if **-fg** is given) or (r, theta), or perhaps (x, y[, z])
  52. if **-Ci** is given). If no file is specified, **vector**, will
  53. read from standard input.
  54. .. _-A:
  55. **-A**\ **m**\ [*conf*]\|\ *vector*
  56. Specify a single, primary vector instead of reading *tables*; see
  57. *tables* for possible vector formats. Alternatively, append **m**
  58. to read *tables* and set the single, primary vector to be the mean
  59. resultant vector first. We also compute the confidence ellipse for
  60. the mean vector (azimuth of major axis, major axis, and minor axis;
  61. for geographic data the axes will be reported in km). You may
  62. optionally append the confidence level in percent [95]. These three
  63. parameters are reported in the final three output columns.
  64. .. _-C:
  65. **-C**\ [**i**\|\ **o**]
  66. Select Cartesian coordinates on input and output. Append **i** for
  67. input only or **o** for output only; otherwise both input and output
  68. will be assumed to be Cartesian [Default is polar r/theta for 2-D
  69. data and geographic lon/lat for 3-D].
  70. .. _-E:
  71. **-E**
  72. Convert input geographic coordinates from geodetic to geocentric and
  73. output geographic coordinates from geocentric to geodetic. Ignored
  74. unless **-fg** is in effect, and is bypassed if **-C** is selected.
  75. .. _-N:
  76. **-N**
  77. Normalize the resultant vectors prior to reporting the output [No
  78. normalization]. This only has an effect if **-Co** is selected.
  79. .. _-S:
  80. **-S**\ [*vector*]
  81. Specify a single, secondary vector in the same format as the first
  82. vector. Required by operations in **-T** that need two vectors
  83. (average, bisector, dot product, cross product, and sum).
  84. .. _-T:
  85. **-T**\ **a**\|\ **d**\|\ **D**\|\ **p**\ *az*\|\ **s**\|\ **r**\ [*arg*]\|\ **R**\|\ **s**\|\ **t**\ [*arg*]\|\ **x**
  86. Specify the vector transformation of interest. Append **a** for
  87. average, **b** for the pole of the two points bisector, **d** for
  88. dot product (use **D** to get angle in degrees between the two
  89. vectors), **p**\ *az* for the pole to the great circle specified by
  90. input vector and the circle's *az* (no second vector used), **s** for vector sum,
  91. **r**\ *par* for vector rotation (here, *par* is a single
  92. angle for 2-D Cartesian data and *lon/lat/angle* for a 3-D rotation
  93. pole and angle), **R** will instead rotate the fixed secondary vector
  94. by the rotations implied by the input records, **t** to translate
  95. the input point by *distance* in the *azimuth* direction (append *azimuth*/*distance*\ [*unit*]
  96. for the same translation for all input points, or just append
  97. *unit* to read *azimuth* and *distance* (in specified *unit* [**e**])
  98. from the third and fourth data column in the file, and **x** for cross-product.
  99. If **-T** is not given then no transformation takes place; the
  100. output is determined by other options such as **-A**, **-C**,
  101. **-E**, and **-N**.
  102. .. _-V:
  103. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  104. .. include:: explain_-V.rst_
  105. .. |Add_-bi| replace:: [Default is 2 or 3 input columns].
  106. .. include:: explain_-bi.rst_
  107. .. |Add_-d| unicode:: 0x20 .. just an invisible code
  108. .. include:: explain_-d.rst_
  109. .. |Add_-e| unicode:: 0x20 .. just an invisible code
  110. .. include:: explain_-e.rst_
  111. .. |Add_-f| unicode:: 0x20 .. just an invisible code
  112. .. include:: explain_-f.rst_
  113. .. |Add_-g| unicode:: 0x20 .. just an invisible code
  114. .. include:: explain_-g.rst_
  115. .. |Add_-h| unicode:: 0x20 .. just an invisible code
  116. .. include:: explain_-h.rst_
  117. .. include:: explain_-icols.rst_
  118. .. include:: explain_-ocols.rst_
  119. .. include:: explain_-q.rst_
  120. .. include:: explain_colon.rst_
  121. .. include:: explain_help.rst_
  122. .. include:: explain_precision.rst_
  123. Examples
  124. --------
  125. .. include:: explain_example.rst_
  126. To determine the mean location of all points in the remote geographic file @ship_15.txt
  127. as well as the 95% confidence ellipse around that point, try::
  128. gmt vector @ship_15.txt -Am -fg
  129. Suppose you have a file with lon, lat called points.txt. You want to
  130. compute the spherical angle between each of these points and the
  131. location 133/34. Try::
  132. gmt vector points.txt -S133/34 -TD -fg > angles.txt
  133. To rotate the same points 35 degrees around a pole at 133/34, and output
  134. Cartesian 3-D vectors, use::
  135. gmt vector points.txt -Tr133/34/35 -Co -fg > reconstructed.txt
  136. To rotate the point 65/33 by all rotations given in file rots.txt, use::
  137. gmt vector rots.txt -TR -S64/33 -fg > reconstructed.txt
  138. To compute the cross-product between the two Cartesian vectors 0.5/1/2
  139. and 1/0/0.4, and normalizing the result, try::
  140. gmt vector -A0.5/1/2 -Tx -S1/0/0.4 -N -C > cross.txt
  141. To rotate the 2-D vector, given in polar form as r = 2 and theta = 35,
  142. by an angle of 120, try::
  143. gmt vector -A2/35 -Tr120 > rotated.txt
  144. To find the mid-point along the great circle connecting the points 123/35 and -155/-30, use::
  145. gmt vector -A123/35 -S-155/-30 -Ta -fg > midpoint.txt
  146. To find the mean location of the geographical points listed in
  147. points.txt, with its 99% confidence ellipse, use::
  148. gmt vector points.txt -Am99 -fg > centroid.txt
  149. To find the pole corresponding to the great circle that goes through
  150. the point -30/60 at an azimuth of 105 degrees, use::
  151. gmt vector -A-30/60 -Tp105 -fg > pole.txt
  152. To translate all locations in the geographic file points.txt
  153. by 65 km to the NE, try::
  154. gmt vector points -Tt45/65k -fg > shifted.txt
  155. Rotations
  156. ---------
  157. For more advanced 3-D rotations as used in plate tectonic
  158. reconstructions, see the GMT "spotter" supplement.
  159. See Also
  160. --------
  161. :doc:`gmt`, :doc:`project`, :doc:`mapproject`
Tip!

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

Comments

Loading...