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

kml2gmt.rst 2.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
  1. .. index:: ! kml2gmt
  2. .. include:: module_core_purpose.rst_
  3. *******
  4. kml2gmt
  5. *******
  6. |kml2gmt_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt kml2gmt** [ *kmlfiles* ]
  11. [ |-E| ]
  12. [ |-F|\ **s**\|\ **l**\|\ **p** ]
  13. [ |SYN_OPT-V| ]
  14. [ |-Z| ]
  15. [ |SYN_OPT-bo| ]
  16. [ |SYN_OPT-do| ]
  17. [ |SYN_OPT-:| ]
  18. [ |SYN_OPT--| ]
  19. |No-spaces|
  20. Description
  21. -----------
  22. **kml2gmt** reads a Google Earth KML file and outputs a GMT table file.
  23. Only KML files that contain points, lines, or polygons can be processed.
  24. This is a bare-bones operation that aims to extract coordinates and
  25. possibly the name and description tags of each feature. The main use
  26. intended is to capture coordinates modified in Google Earth and then
  27. reinsert the modified data into the original GMT data file. For a more
  28. complete reformatting, consider using **ogr2ogr -f** "GMT" somefile.gmt
  29. somefile.kml.
  30. Required Arguments
  31. ------------------
  32. None.
  33. Optional Arguments
  34. ------------------
  35. *kmlfiles*
  36. Name of one or more KML files to work on. If not are given, then
  37. standard input is read.
  38. .. _-E:
  39. **-E**
  40. Get the altitude from the *ExtendData* property; *z* coordinates are then ignored. KML provides
  41. more than one mechanism to store information via *ExtendData* but here we only implemented the
  42. *<SimpleData name="string">* variation. Implicitly sets **-Z**
  43. .. _-F:
  44. **-F**\ **s**\|\ **l**\|\ **p**
  45. Specify a particular feature type to output. Choose from points (**s**),
  46. **l**\ ine, or **p**\ olygon. By default we output all geometries.
  47. .. _-Z:
  48. **-Z**
  49. Output the altitude coordinates as GMT z coordinates [Default will
  50. output just longitude and latitude].
  51. .. _-V:
  52. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  53. .. include:: explain_-V.rst_
  54. .. |Add_-bo| unicode:: 0x20 .. just an invisible code
  55. .. include:: explain_-bo.rst_
  56. .. |Add_-do| unicode:: 0x20 .. just an invisible code
  57. .. include:: explain_-do.rst_
  58. .. include:: explain_colon.rst_
  59. .. include:: explain_help.rst_
  60. Notes
  61. -----
  62. If polygons are digitized you can enter them in any order. If you have both perimeters
  63. and holes we suggest you run the output through **gmt spatial -Sh** which will
  64. determine which polygons are perimeters and holes and organize them so that
  65. any holes immediately will follow their perimeters and that their segment headers will
  66. contain the **-Ph** flag and have the reverse handedness. This output may be
  67. plotted by :doc:`plot` and the holes will be honored.
  68. Examples
  69. --------
  70. .. include:: explain_example.rst_
  71. To extract the lon,lat values from the KML file google.kml, try
  72. ::
  73. gmt kml2gmt google.kml -V > google.txt
  74. To separate the point and polygon geometries from the KML file google.kml, try
  75. ::
  76. gmt kml2gmt google.kml -Fp -V > polygons.txt
  77. gmt kml2gmt google.kml -Fs -V > points.txt
  78. See Also
  79. --------
  80. :doc:`gmt`, :doc:`gmt.conf`,
  81. :doc:`img2google <supplements/img/img2google>`,
  82. :doc:`psconvert`, :doc:`gmt2kml`, :doc:`gmtspatial`
Tip!

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

Comments

Loading...