1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4//EN" "../../../Tools/dtd/docbook-4.4/docbookx.dtd">
3 <refentry id="gpst" lang="en">
4 <!-- File ID: 84662624-f924-11dd-9043-0001805bf4b1 -->
6 <refentrytitle>gpst</refentrytitle>
7 <manvolnum>1</manvolnum>
10 <refname>gpst</refname>
11 <refpurpose>Converts between various GPS formats.</refpurpose>
16 <command>gpst</command>
18 <replaceable>options</replaceable>
20 <arg choice="opt" rep="repeat">
21 <replaceable>file</replaceable>
26 <command>gpst</command>
27 <arg choice="req">-S</arg>
29 <replaceable>options</replaceable>
31 <arg choice="opt" rep="repeat">
32 <replaceable>file</replaceable>
37 <refsect1 id="gpst.description">
38 <title>Description</title>
43 <term><option>--chronology</option></term>
45 <para>Check for broken chronology, warn about entries with an
51 <term><option>-d</option>, <option>--skip-dups</option></term>
53 <para>If succeeding identical coordinates are found, print
54 only the first one and ignore the rest.</para>
59 <term><option>-e</option>, <option>--epoch</option></term>
61 <para>Use seconds since 1970-01-01 00:00:00 GMT as date
67 <term><option>--fix</option></term>
69 <para>Comment out entries which is obviously wrong.
70 Use together with <option>--chronology</option> to fix those
72 Does not work with GPX output yet.</para>
77 <term><option>--from-date
78 <replaceable>x</replaceable></option></term>
80 <para>Used by the <literal>pgwupd</literal> format.
81 Specifies from which date waypoints should be updated.
82 No checks for valid date format here, let
83 <application>PostgreSQL</application> take care of that.
84 All variants it understands can be used here.</para>
89 <term><option>-h</option>, <option>--help</option></term>
91 <para>Send a brief help summary to stdout.</para>
96 <term><option>--inside</option></term>
98 <para>Print only trackpoints inside a rectangle specified by
99 <option>--pos1</option> and <option>--pos2</option>.</para>
104 <term><option>-n</option>, <option>--undefined
105 <replaceable>x</replaceable></option></term>
107 <para>Use <replaceable>x</replaceable> as undefined
113 <term><option>--near</option></term>
115 <para>Add names of the three closest waypoints to the
117 Unfinished and experimental, needs <citerefentry>
118 <refentrytitle>gpsbabel</refentrytitle>
119 <manvolnum>1</manvolnum> </citerefentry>, which is called from
121 <command>/usr/local/bin/gpsbabel</command>.</para>
126 <term><option>-o</option>, <option>--output-format
127 <replaceable>x</replaceable></option></term>
129 <para>Use output format <replaceable>x</replaceable>:</para>
133 <term><option>clean</option></term>
135 <para>TAB-separated format with longitude, latitude and
141 <term><option>csv</option></term>
143 <para>TAB-separated format:
149 <para>Date of trackpoint.
151 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal>
152 unless the <option>--epoch</option> option is
154 If so, it’s represented as number of seconds since
155 1970-01-01 00:00:00 UTC.</para>
160 <term>longitude</term>
162 <para>Longitude, decimal degrees.</para>
167 <term>latitude</term>
169 <para>Latitude, decimal degrees.</para>
174 <term>altitude</term>
176 <para>Altitude in metres above sea level.
178 If not present, the corresponding TAB is also
179 printed, to keep the number of columns
184 </variablelist></para>
189 <term><option>gpsml</option> (Default)</term>
191 <para>Line-based XML which makes it easy to edit and
193 In the past, there was this big plan about making this
194 the default storage format, so it was declared as The
195 Honourable Default Output Format.
196 But using GPX is the way to go, so this will probably
197 change in the future.
198 It’s way too <foreignphrase>de facto</foreignphrase> and
199 widely used, so storing GPS data in anything else is
201 Probably not finished yet.</para>
206 <term><option>gpstrans</option></term>
208 <para>The format generated by <citerefentry>
209 <refentrytitle>gpstrans</refentrytitle>
210 <manvolnum>1</manvolnum> </citerefentry>.</para>
215 <term><option>gpx</option></term>
217 <para>Not complete yet, but good enough in most
223 <term><option>pgtab</option></term>
225 <para>TAB-separated format for import into
226 <application>PostgreSQL</application>.
227 Undefined values are written as <literal>\N</literal> if
228 the <option>--undefined</option> option is not
233 <term><database class="field">date</database></term>
236 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal></para>
241 <term><database class="field">coor</database></term>
244 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
249 <term><database class="field">ele</database></term>
251 <para>Altitude in metres above sea level.</para>
256 <term><database class="field">name</database></term>
258 <para>Short name of closest waypoint.
260 <application>PostgreSQL</application>, so this
261 value is always <literal>\N</literal>.</para>
266 <term><database class="field">dist</database></term>
268 <para>Distance in decimal degrees to closest
271 <application>PostgreSQL</application>, so this
272 value is always <literal>\N</literal>.</para>
278 class="field">description</database></term>
280 <para>Description of waypoint.
282 <application>PostgreSQL</application>, so this
283 value is always <literal>\N</literal>.</para>
292 <term><option>pgwtab</option></term>
294 <para>Output waypoints on a TAB-separated format:</para>
298 <term><database class="field">coor</database></term>
301 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
306 <term><database class="field">name</database></term>
308 <para>Title of waypoint.</para>
313 <term><database class="field">ele</database></term>
315 <para>Elevation in metres above sea level.</para>
320 <term><database class="field">type</database></term>
322 <para>Type of waypoint, same as the GPX <sgmltag
323 class="starttag">type</sgmltag> element.</para>
328 <term><database class="field">time</database></term>
330 <para>Timestamp of waypoint.</para>
335 <term><database class="field">cmt</database></term>
337 <para>Short waypoint description, used by the GPS
339 Same as the GPX <sgmltag
340 class="starttag">cmt</sgmltag> element.</para>
346 class="field">descr</database></term>
348 <para>Long description, not used by the GPS.
349 Same as the GPX <sgmltag
350 class="starttag">desc</sgmltag> element.</para>
355 <term><database class="field">src</database></term>
357 <para>Source of data, same as the <sgmltag
358 class="starttag">src</sgmltag> GPX element.</para>
363 <term><database class="field">sym</database></term>
365 <para>GPS symbol name.
367 class="starttag">sym</sgmltag> GPX element.</para>
376 <term><option>pgwupd</option></term>
378 <para>Output waypoints as SQL transactions which updates
379 the <database class="field">name</database> and
380 <database class="field">dist</database> columns.</para>
385 <term><option>poscount</option></term>
387 <para>Creates a 3D plot where areas with many
388 trackpoints are higher than areas with less track
394 <term><option>ps</option></term>
396 <para>Postscript. Unfinished.</para>
401 <term><option>svg</option></term>
403 <para>Unfinished.</para>
408 <term><option>xgraph</option></term>
410 <para>Input format for <citerefentry>
411 <refentrytitle>xgraph</refentrytitle>
412 <manvolnum>1</manvolnum> </citerefentry>.</para>
417 <term><option>ygraph</option></term>
419 <para>Input format for <citerefentry>
420 <refentrytitle>ygraph</refentrytitle>
421 <manvolnum>1</manvolnum> </citerefentry>.</para>
430 <term><option>--outside</option></term>
432 <para>Print only trackpoints outside a rectangle specified by
433 <option>--pos1</option> and <option>--pos2</option>.</para>
439 <replaceable>x1</replaceable>,<replaceable>y1</replaceable></option></term>
441 <replaceable>x2</replaceable>,<replaceable>y2</replaceable></option></term>
443 <para>Specifies corners of an area rectangle used by the
444 <option>--inside</option> and <option>--outside</option>
446 The <replaceable>x</replaceable> and
447 <replaceable>y</replaceable> values are specified as decimal
448 degrees, negative for west or south.</para>
453 <term><option>-r</option>, <option>--require
454 <replaceable>x</replaceable></option></term>
456 <para>Specify requirements for trackpoints to be written.
457 <replaceable>x</replaceable> is a string with the following
462 <term><option>e</option></term>
464 <para>Print only waypoints which have an
470 <term><option>p</option></term>
472 <para>Print only waypoints which have a position.</para>
477 <term><option>t</option></term>
479 <para>Print only waypoints which have a
489 <term><option>-R</option>, <option>--round
490 <replaceable>x</replaceable>=<replaceable>y</replaceable><optional>,<replaceable>x2</replaceable>=<replaceable>y2</replaceable><optional>...</optional></optional></option></term>
492 <para>Round trackpoint element <replaceable>x</replaceable> to
493 <replaceable>y</replaceable> decimals.</para>
494 <para>Example:</para>
496 <para><option>--round lat=4,lon=5,ele=1</option></para>
502 <term><option>-s</option>, <option>--short-date</option></term>
504 <para>Use short date format.</para>
509 <term><option>-S</option>, <option>--save-to-file
510 <replaceable>x</replaceable></option></term>
512 <para>Save the unconverted data to a file with a filename
513 starting with the timestamp of the first trackpoint.
514 The parameter string <replaceable>x</replaceable> is added at
515 the end of the filename.
516 For the time being this option will ignore all other
519 <para>If several files are specified on the command line,
520 all data will be saved into only one file.
521 This behaviour may change in the future.</para>
527 <term><option>-t</option>,
528 <option>--create-breaks</option></term>
530 <para>Create breaks in track between points with a difference
531 more than the number of seconds specified by the
532 <envar>PAUSE_LIMIT</envar> variable.</para>
537 <term><option>-T <replaceable>x</replaceable></option>,
539 <replaceable>x</replaceable></option></term>
541 <para>Move timestamps <replaceable>x</replaceable> seconds
542 forwards or backwards in output.
543 <replaceable>x</replaceable> can be a positive or negative
549 <term><option>-v</option>, <option>--verbose</option></term>
551 <para>Verbose output, can be repeated.</para>
556 <term><option>--version</option></term>
558 <para>Print program version information.</para>
563 <term><option>-w</option>,
564 <option>--strip-whitespace</option></term>
566 <para>Strip all unnecessary whitespace.</para>
571 <term><option>-y</option>,
572 <option>--double-y-scale</option></term>
574 <para>Double Y scale (latitude).</para>
579 <term><option>--debug</option></term>
581 <para>Print debugging messages.</para>
588 <refsect1 id="gpst.bugs">
589 <title>Bugs and things that need to be done</title>
594 <para>Pretty incomplete in some areas.
595 Some of the source formats are undocumented and thus incomplete.
596 Some functionality is not working properly, for example the
597 Postscript output.</para>
601 <para>Remove hardcodings.</para>
605 <para>Translate database column names to English.</para>
609 <para>Add more tests to cover all command-line options.</para>
615 <refsect1 id="gpst.author">
616 <title>Author</title>
618 <para>Made by <personname><firstname>Øyvind</firstname>
619 <othername>A.</othername> <surname>Holm</surname></personname>
620 <email>sunny@sunbase.org</email>.</para>
623 <refsect1 id="gpst.copyright">
624 <title>Copyright</title>
626 <para>Copyleft © <personname><firstname>Øyvind</firstname>
627 <othername>A.</othername> <surname>Holm</surname></personname>
628 <email>sunny@sunbase.org</email>.
629 This is free software; see the file <filename>COPYING</filename> for
630 legalese stuff.</para>
633 <refsect1 id="gpst.license">
634 <title>License</title>
636 <para>This program is free software: you can redistribute it and/or
637 modify it under the terms of the <citetitle>GNU General Public
638 License</citetitle> as published by the <orgname
639 class="nonprofit">Free Software Foundation</orgname>, either version
640 3 of the License, or (at your option) any later version.</para>
642 <para>This program is distributed in the hope that it will be
643 useful, but <emphasis>WITHOUT ANY WARRANTY</emphasis>; without even
644 the implied warranty of <emphasis>MERCHANTABILITY</emphasis> or
645 <emphasis>FITNESS FOR A PARTICULAR PURPOSE</emphasis>.
646 See the GNU General Public License for more details.</para>
648 <para>You should have received a copy of the GNU General Public
649 License along with this program.
650 If not, see <ulink url="http://www.gnu.org/licenses/" />.</para>
653 <refsect1 id="gpst.seealso">
654 <title>See also</title>
657 <refentrytitle>gpsbabel</refentrytitle>
658 <manvolnum>1</manvolnum>
659 </citerefentry></para>
662 <!-- vim: set tw=72 ts=2 sts=2 sw=2 et fo=tcqw fenc=UTF-8 : -->