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 <date><![CDATA[$Id$]]></date>
9 <refentrytitle>gpst</refentrytitle>
10 <manvolnum>1</manvolnum>
13 <refname>gpst</refname>
14 <refpurpose>Converts between various GPS formats.</refpurpose>
19 <command>gpst</command>
21 <replaceable>options</replaceable>
23 <arg choice="opt" rep="repeat">
24 <replaceable>file</replaceable>
29 <command>gpst</command>
30 <arg choice="req">-S</arg>
32 <replaceable>options</replaceable>
34 <arg choice="opt" rep="repeat">
35 <replaceable>file</replaceable>
40 <refsect1 id="gpst.description">
41 <title>Description</title>
46 <term><option>--chronology</option></term>
48 <para>Check for broken chronology, warn about entries with an
54 <term><option>-d</option>, <option>--skip-dups</option></term>
56 <para>If succeeding identical coordinates are found, print
57 only the first one and ignore the rest.</para>
62 <term><option>-e</option>, <option>--epoch</option></term>
64 <para>Use seconds since 1970-01-01 00:00:00 GMT as date
70 <term><option>--fix</option></term>
72 <para>Comment out entries which is obviously wrong.
73 Use together with <option>--chronology</option> to fix those
75 Does not work with GPX output yet.</para>
80 <term><option>--from-date
81 <replaceable>x</replaceable></option></term>
83 <para>Used by the <literal>pgwupd</literal> format.
84 Specifies from which date waypoints should be updated.
85 No checks for valid date format here, let
86 <application>PostgreSQL</application> take care of that.
87 All variants it understands can be used here.</para>
92 <term><option>-h</option>, <option>--help</option></term>
94 <para>Send a brief help summary to stdout.</para>
99 <term><option>--inside</option></term>
101 <para>Print only trackpoints inside a rectangle specified by
102 <option>--pos1</option> and <option>--pos2</option>.</para>
107 <term><option>-n</option>, <option>--undefined
108 <replaceable>x</replaceable></option></term>
110 <para>Use <replaceable>x</replaceable> as undefined
116 <term><option>--near</option></term>
118 <para>Add names of the three closest waypoints to the
120 Unfinished and experimental, needs <citerefentry>
121 <refentrytitle>gpsbabel</refentrytitle>
122 <manvolnum>1</manvolnum> </citerefentry>, which is called from
124 <command>/usr/local/bin/gpsbabel</command>.</para>
129 <term><option>-o</option>, <option>--output-format
130 <replaceable>x</replaceable></option></term>
132 <para>Use output format <replaceable>x</replaceable>:</para>
136 <term><option>clean</option></term>
138 <para>TAB-separated format with longitude, latitude and
144 <term><option>csv</option></term>
146 <para>TAB-separated format:
152 <para>Date of trackpoint.
154 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal>
155 unless the <option>--epoch</option> option is
157 If so, it’s represented as number of seconds since
158 1970-01-01 00:00:00 UTC.</para>
163 <term>longitude</term>
165 <para>Longitude, decimal degrees.</para>
170 <term>latitude</term>
172 <para>Latitude, decimal degrees.</para>
177 <term>altitude</term>
179 <para>Altitude in metres above sea level.
181 If not present, the corresponding TAB is also
182 printed, to keep the number of columns
187 </variablelist></para>
192 <term><option>gpsml</option> (Default)</term>
194 <para>Line-based XML which makes it easy to edit and
196 In the past, there was this big plan about making this
197 the default storage format, so it was declared as The
198 Honourable Default Output Format.
199 But using GPX is the way to go, so this will probably
200 change in the future.
201 It’s way too <foreignphrase>de facto</foreignphrase> and
202 widely used, so storing GPS data in anything else is
204 Probably not finished yet.</para>
209 <term><option>gpstrans</option></term>
211 <para>The format generated by <citerefentry>
212 <refentrytitle>gpstrans</refentrytitle>
213 <manvolnum>1</manvolnum> </citerefentry>.</para>
218 <term><option>gpx</option></term>
220 <para>Not complete yet, but good enough in most
226 <term><option>pgtab</option></term>
228 <para>TAB-separated format for import into
229 <application>PostgreSQL</application>.
230 Undefined values are written as <literal>\N</literal> if
231 the <option>--undefined</option> option is not
236 <term><database class="field">date</database></term>
239 <literal><replaceable>yyyy</replaceable>-<replaceable>mm</replaceable>-<replaceable>dd</replaceable>T<replaceable>hh</replaceable>:<replaceable>mm</replaceable>:<replaceable>ss</replaceable>Z</literal></para>
244 <term><database class="field">coor</database></term>
247 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
252 <term><database class="field">ele</database></term>
254 <para>Altitude in metres above sea level.</para>
259 <term><database class="field">name</database></term>
261 <para>Short name of closest waypoint.
263 <application>PostgreSQL</application>, so this
264 value is always <literal>\N</literal>.</para>
269 <term><database class="field">dist</database></term>
271 <para>Distance in decimal degrees to closest
274 <application>PostgreSQL</application>, so this
275 value is always <literal>\N</literal>.</para>
281 class="field">description</database></term>
283 <para>Description of waypoint.
285 <application>PostgreSQL</application>, so this
286 value is always <literal>\N</literal>.</para>
295 <term><option>pgwtab</option></term>
297 <para>Output waypoints on a TAB-separated format:</para>
301 <term><database class="field">coor</database></term>
304 <literal>(<replaceable>lat</replaceable>,<replaceable>lon</replaceable>)</literal></para>
309 <term><database class="field">name</database></term>
311 <para>Title of waypoint.</para>
316 <term><database class="field">ele</database></term>
318 <para>Elevation in metres above sea level.</para>
323 <term><database class="field">type</database></term>
325 <para>Type of waypoint, same as the GPX <sgmltag
326 class="starttag">type</sgmltag> element.</para>
331 <term><database class="field">time</database></term>
333 <para>Timestamp of waypoint.</para>
338 <term><database class="field">cmt</database></term>
340 <para>Short waypoint description, used by the GPS
342 Same as the GPX <sgmltag
343 class="starttag">cmt</sgmltag> element.</para>
349 class="field">descr</database></term>
351 <para>Long description, not used by the GPS.
352 Same as the GPX <sgmltag
353 class="starttag">desc</sgmltag> element.</para>
358 <term><database class="field">src</database></term>
360 <para>Source of data, same as the <sgmltag
361 class="starttag">src</sgmltag> GPX element.</para>
366 <term><database class="field">sym</database></term>
368 <para>GPS symbol name.
370 class="starttag">sym</sgmltag> GPX element.</para>
379 <term><option>pgwupd</option></term>
381 <para>Output waypoints as SQL transactions which updates
382 the <database class="field">name</database> and
383 <database class="field">dist</database> columns.</para>
388 <term><option>poscount</option></term>
390 <para>Creates a 3D plot where areas with many
391 trackpoints are higher than areas with less track
397 <term><option>ps</option></term>
399 <para>Postscript. Unfinished.</para>
404 <term><option>svg</option></term>
406 <para>Unfinished.</para>
411 <term><option>xgraph</option></term>
413 <para>Input format for <citerefentry>
414 <refentrytitle>xgraph</refentrytitle>
415 <manvolnum>1</manvolnum> </citerefentry>.</para>
420 <term><option>ygraph</option></term>
422 <para>Input format for <citerefentry>
423 <refentrytitle>ygraph</refentrytitle>
424 <manvolnum>1</manvolnum> </citerefentry>.</para>
433 <term><option>--outside</option></term>
435 <para>Print only trackpoints outside a rectangle specified by
436 <option>--pos1</option> and <option>--pos2</option>.</para>
442 <replaceable>x1</replaceable>,<replaceable>y1</replaceable></option></term>
444 <replaceable>x2</replaceable>,<replaceable>y2</replaceable></option></term>
446 <para>Specifies corners of an area rectangle used by the
447 <option>--inside</option> and <option>--outside</option>
449 The <replaceable>x</replaceable> and
450 <replaceable>y</replaceable> values are specified as decimal
451 degrees, negative for west or south.</para>
456 <term><option>-r</option>, <option>--require
457 <replaceable>x</replaceable></option></term>
459 <para>Specify requirements for trackpoints to be written.
460 <replaceable>x</replaceable> is a string with the following
465 <term><option>e</option></term>
467 <para>Print only waypoints which have an
473 <term><option>p</option></term>
475 <para>Print only waypoints which have a position.</para>
480 <term><option>t</option></term>
482 <para>Print only waypoints which have a
492 <term><option>-R</option>, <option>--round
493 <replaceable>x</replaceable>=<replaceable>y</replaceable><optional>,<replaceable>x2</replaceable>=<replaceable>y2</replaceable><optional>...</optional></optional></option></term>
495 <para>Round trackpoint element <replaceable>x</replaceable> to
496 <replaceable>y</replaceable> decimals.</para>
497 <para>Example:</para>
499 <para><option>--round lat=4,lon=5,ele=1</option></para>
505 <term><option>-s</option>, <option>--short-date</option></term>
507 <para>Use short date format.</para>
512 <term><option>-S</option>, <option>--save-to-file
513 <replaceable>x</replaceable></option></term>
515 <para>Save the unconverted data to a file with a filename
516 starting with the timestamp of the first trackpoint.
517 The parameter string <replaceable>x</replaceable> is added at
518 the end of the filename.
519 For the time being this option will ignore all other
522 <para>If several files are specified on the command line,
523 all data will be saved into only one file.
524 This behaviour may change in the future.</para>
530 <term><option>-t</option>,
531 <option>--create-breaks</option></term>
533 <para>Create breaks in track between points with a difference
534 more than the number of seconds specified by the
535 <envar>PAUSE_LIMIT</envar> variable.</para>
540 <term><option>-T <replaceable>x</replaceable></option>,
542 <replaceable>x</replaceable></option></term>
544 <para>Move timestamps <replaceable>x</replaceable> seconds
545 forwards or backwards in output.
546 <replaceable>x</replaceable> can be a positive or negative
552 <term><option>-v</option>, <option>--verbose</option></term>
554 <para>Verbose output, can be repeated.</para>
559 <term><option>--version</option></term>
561 <para>Print program version information.</para>
566 <term><option>-w</option>,
567 <option>--strip-whitespace</option></term>
569 <para>Strip all unnecessary whitespace.</para>
574 <term><option>-y</option>,
575 <option>--double-y-scale</option></term>
577 <para>Double Y scale (latitude).</para>
582 <term><option>--debug</option></term>
584 <para>Print debugging messages.</para>
591 <refsect1 id="gpst.bugs">
592 <title>Bugs and things that need to be done</title>
597 <para>Pretty incomplete in some areas.
598 Some of the source formats are undocumented and thus incomplete.
599 Some functionality is not working properly, for example the
600 Postscript output.</para>
604 <para>Remove hardcodings.</para>
608 <para>Translate database column names to English.</para>
612 <para>Add more tests to cover all command-line options.</para>
618 <refsect1 id="gpst.author">
619 <title>Author</title>
621 <para>Made by <personname><firstname>Øyvind</firstname>
622 <othername>A.</othername> <surname>Holm</surname></personname>
623 <email>sunny@sunbase.org</email>.</para>
626 <refsect1 id="gpst.copyright">
627 <title>Copyright</title>
629 <para>Copyleft © <personname><firstname>Øyvind</firstname>
630 <othername>A.</othername> <surname>Holm</surname></personname>
631 <email>sunny@sunbase.org</email>.
632 This is free software; see the file <filename>COPYING</filename> for
633 legalese stuff.</para>
636 <refsect1 id="gpst.license">
637 <title>License</title>
639 <para>This program is free software; you can redistribute it and/or
640 modify it under the terms of the <citetitle>GNU General Public
641 License</citetitle> as published by the <orgname
642 class="nonprofit">Free Software Foundation</orgname>; either version
643 2 of the License, or (at your option) any later version.</para>
645 <para>This program is distributed in the hope that it will be
646 useful, but <emphasis>WITHOUT ANY WARRANTY</emphasis>; without even
647 the implied warranty of <emphasis>MERCHANTABILITY</emphasis> or
648 <emphasis>FITNESS FOR A PARTICULAR PURPOSE</emphasis>.
649 See the GNU General Public License for more details.</para>
651 <para>You should have received a copy of the GNU General Public
652 License along with this program; if not, write to
653 <address>The Free Software Foundation, Inc.
654 <street>59 Temple Place</street>, <otheraddr>Suite 330</otheraddr>
655 <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
656 <country>USA</country></address></para>
659 <refsect1 id="gpst.seealso">
660 <title>See also</title>
663 <refentrytitle>gpsbabel</refentrytitle>
664 <manvolnum>1</manvolnum>
665 </citerefentry></para>
668 <!-- vim: set tw=72 ts=2 sts=2 sw=2 et fo=tcqw fenc=UTF-8 : -->