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

gmtsimplify.rst 3.8 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
  1. .. index:: ! gmtsimplify
  2. .. include:: module_core_purpose.rst_
  3. ***********
  4. gmtsimplify
  5. ***********
  6. |gmtsimplify_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt simplify** [ *table* ] |-T|\ *tolerance*
  11. [ |SYN_OPT-V| ]
  12. [ |SYN_OPT-b| ]
  13. [ |SYN_OPT-d| ]
  14. [ |SYN_OPT-e| ]
  15. [ |SYN_OPT-f| ]
  16. [ |SYN_OPT-g| ]
  17. [ |SYN_OPT-h| ]
  18. [ |SYN_OPT-i| ]
  19. [ |SYN_OPT-o| ]
  20. [ |SYN_OPT-q| ]
  21. [ |SYN_OPT-:| ]
  22. [ |SYN_OPT--| ]
  23. |No-spaces|
  24. Description
  25. -----------
  26. **simplify** reads one or more data files and apply the Douglas-Peucker
  27. line simplification algorithm. The method recursively subdivides a
  28. polygon until a run of points can be replaced by a straight line
  29. segment, with no point in that run deviating from the straight line by
  30. more than the tolerance. Have a look at this site to get a visual
  31. insight on how the algorithm works
  32. (http://geometryalgorithms.com/Archive/algorithm_0205/algorithm_0205.htm)
  33. Required Arguments
  34. ------------------
  35. .. _-T:
  36. **-T**\ *tolerance*
  37. Specifies the maximum mismatch tolerance in the user units. If the
  38. data are not Cartesian then append a suitable distance unit (see `Units`_).
  39. Optional Arguments
  40. ------------------
  41. .. |Add_intables| unicode:: 0x20 .. just an invisible code
  42. .. include:: explain_intables.rst_
  43. .. _-V:
  44. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  45. .. include:: explain_-V.rst_
  46. .. |Add_-bi| replace:: [Default is 2 input columns].
  47. .. include:: explain_-bi.rst_
  48. .. |Add_-bo| replace:: [Default is same as input].
  49. .. include:: explain_-bo.rst_
  50. .. |Add_-d| unicode:: 0x20 .. just an invisible code
  51. .. include:: explain_-d.rst_
  52. .. |Add_-e| unicode:: 0x20 .. just an invisible code
  53. .. include:: explain_-e.rst_
  54. .. |Add_-f| unicode:: 0x20 .. just an invisible code
  55. .. include:: explain_-f.rst_
  56. .. |Add_-g| unicode:: 0x20 .. just an invisible code
  57. .. include:: explain_-g.rst_
  58. .. |Add_-h| unicode:: 0x20 .. just an invisible code
  59. .. include:: explain_-h.rst_
  60. .. include:: explain_-icols.rst_
  61. .. include:: explain_-ocols.rst_
  62. .. include:: explain_-q.rst_
  63. .. include:: explain_colon.rst_
  64. .. include:: explain_help.rst_
  65. .. include:: explain_distunits.rst_
  66. .. include:: explain_precision.rst_
  67. Examples
  68. --------
  69. .. include:: explain_example.rst_
  70. To reduce the remote high-resolution GSHHG polygon for Australia down to
  71. a tolerance of 500 km, use::
  72. gmt simplify @GSHHS_h_Australia.txt -T500k
  73. To reduce the Cartesian lines xylines.txt using a tolerance of 0.45 and
  74. write the reduced lines to file new_xylines.txt, run::
  75. gmt simplify xylines.txt -T0.45 > new_xylines.txt
  76. Notes
  77. -----
  78. There is a slight difference in how **simplify** processes lines versus
  79. closed polygons. Segments that are explicitly closed will be considered
  80. polygons, otherwise we treat them as line segments. Hence, segments
  81. recognized as polygons may reduce to a 3-point polygon with no area;
  82. these are suppressed from the output.
  83. Bugs
  84. ----
  85. One known issue with the Douglas-Peucker has to do with crossovers.
  86. Specifically, it cannot be guaranteed that the reduced line does not
  87. cross itself. Depending on how many lines you are considering it is also
  88. possible that reduced lines may intersect other reduced lines. Finally,
  89. the current implementation only does Flat Earth calculations even if you
  90. specify spherical; **simplify** will issue a warning and reset the
  91. calculation mode to Flat Earth.
  92. References
  93. ----------
  94. Douglas, D. H., and T. K. Peucker, Algorithms for the reduction of the
  95. number of points required to represent a digitized line of its
  96. caricature, *Can. Cartogr.*, **10**, 112-122, 1973.
  97. This implementation of the algorithm has been kindly provided by Dr.
  98. `Gary J. Robinson <http://www.met.reading.ac.uk/users/users/1327/>`_,
  99. Department of Meteorology, University of Reading, Reading, UK; his
  100. subroutine forms the basis for this program.
  101. See Also
  102. --------
  103. :doc:`gmt`,
  104. :doc:`gmt.conf`,
  105. :doc:`gmtconnect`,
  106. :doc:`gmtconvert`,
  107. :doc:`gmtselect`
Tip!

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

Comments

Loading...