.\" Man page generated from reStructuredText. . .TH "KML2GMT" "1gmt" "Sep 07, 2019" "6.0.0rc4" "GMT" .SH NAME kml2gmt \- Extract GMT table data from Google Earth KML files . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBgmt kml2gmt\fP [ \fIkmlfiles\fP ] [ \fB\-E\fP ] [ \fB\-F\fP\fBs\fP|\fBl\fP|\fBp\fP ] [ \fB\-V\fP[\fIlevel\fP] ] [ \fB\-Z\fP ] [ \fB\-bo\fPbinary ] [ \fB\-do\fPnodata ] [ \fB\-:\fP[\fBi\fP|\fBo\fP] ] [ \fB\-\-PAR\fP=\fIvalue\fP ] .sp \fBNote:\fP No space is allowed between the option flag and the associated arguments. .SH DESCRIPTION .sp \fBkml2gmt\fP reads a Google Earth KML file and outputs a GMT table file. Only KML files that contain points, lines, or polygons can be processed. This is a bare\-bones operation that aims to extract coordinates and possibly the name and description tags of each feature. The main use intended is to capture coordinates modified in Google Earth and then reinsert the modified data into the original GMT data file. For a more complete reformatting, consider using \fBogr2ogr \-f\fP "GMT" somefile.gmt somefile.kml. .SH REQUIRED ARGUMENTS .sp None. .SH OPTIONAL ARGUMENTS .INDENT 0.0 .TP .B \fIkmlfiles\fP Name of one or more KML files to work on. If not are given, then standard input is read. .UNINDENT .INDENT 0.0 .TP \fB\-E\fP Get the altitude from the \fIExtendData\fP property; \fIz\fP coordinates are then ignored. KML provides more than one mechanism to store information via \fIExtendData\fP but here we only implemented the \fI\fP variation. Implicitly sets \fB\-Z\fP .UNINDENT .INDENT 0.0 .TP \fB\-F\fP\fBs\fP|\fBl\fP|\fBp\fP Specify a particular feature type to output. Choose from points (\fBs\fP), \fBl\fPine, or \fBp\fPolygon. By default we output all geometries. .UNINDENT .INDENT 0.0 .TP \fB\-Z\fP Output the altitude coordinates as GMT z coordinates [Default will output just longitude and latitude]. .UNINDENT .INDENT 0.0 .TP \fB\-V\fP[\fIlevel\fP] (more ...) Select verbosity level [c]. .UNINDENT .INDENT 0.0 .TP \fB\-bo\fP[\fIncols\fP][\fItype\fP] (more ...) Select native binary output. .UNINDENT .INDENT 0.0 .TP \fB\-do\fP\fInodata\fP (more ...) Replace output columns that equal NaN with \fInodata\fP\&. .UNINDENT .INDENT 0.0 .TP \fB\-:\fP[\fBi\fP|\fBo\fP] (more ...) Swap 1st and 2nd column on input and/or output. .UNINDENT .INDENT 0.0 .TP \fB\-^\fP or just \fB\-\fP Print a short message about the syntax of the command, then exits (NOTE: on Windows just use \fB\-\fP). .TP \fB\-+\fP or just \fB+\fP Print an extensive usage (help) message, including the explanation of any module\-specific option (but not the GMT common options), then exits. .TP \fB\-?\fP or no arguments Print a complete usage (help) message, including the explanation of all options, then exits. .TP \fB\-\-PAR\fP=\fIvalue\fP Temporarily override a GMT default setting; repeatable. See /gmt.conf for parameters. .UNINDENT .SH NOTES .sp If polygons are digitized you can enter them in any order. If you have both perimeters and holes we suggest you run the output through \fBgmt spatial \-Sh\fP which will determine which polygons are perimeters and holes and organize them so that any holes immediately will follow their perimeters and that their segment headers will contain the \fB\-Ph\fP flag and have the reverse handedness. This output may be plotted by plot and the holes will be honored. .SH EXAMPLES .sp To extract the lon,lat values from the KML file google.kml, try .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt kml2gmt google.kml \-V > google.txt .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp To separate the point and polygon geometries from the KML file google.kml, try .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt kml2gmt google.kml \-Fp \-V > polygons.txt gmt kml2gmt google.kml \-Fs \-V > points.txt .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH SEE ALSO .sp gmt, gmt.conf, img2google, psconvert, gmt2kml, gmtspatial .SH COPYRIGHT 2019, The GMT Team .\" Generated by docutils manpage writer. .