]> git.street.me.uk Git - andy/viking.git/blob - help/viking.xml
[DOC] Help for the extended datasource.
[andy/viking.git] / help / viking.xml
1 <?xml version='1.0' encoding='ISO-8859-1'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4
5 <!--
6
7 Process this file with an XSLT processor: `xsltproc \
8 -''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
9 manpages/docbook.xsl manpage.dbk'.  A manual page
10 <package>.<section> will be generated.  You may view the
11 manual page with: nroff -man <package>.<section> | less'.  A
12 typical entry in a Makefile or Makefile.am is:
13
14 DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
15 manpages/docbook.xsl
16 XP=xsltproc -''-nonet
17
18 manpage.1: manpage.dbk
19         $(XP) $(DB2MAN) $<
20     
21 The xsltproc binary is found in the xsltproc package.  The
22 XSL files are in docbook-xsl.  Please remember that if you
23 create the nroff version in one of the debian/rules file
24 targets (such as build), you will need to include xsltproc
25 and docbook-xsl in your Build-Depends control field.
26
27 -->
28
29   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
30   <!ENTITY dhfirstname "<firstname>Ralf</firstname>">
31   <!ENTITY dhsurname   "<surname>Meyer</surname>">
32   <!-- Please adjust the date whenever revising the manpage. -->
33   <!ENTITY dhdate      "<date>2013-10-13</date>">
34   <!-- Would be nice if the version could auto-update. -->
35   <!ENTITY dhsource      "Viking">
36   <!ENTITY dhversion     "1.5.0">
37   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
38        allowed: see man(7), man(1). -->
39   <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
40   <!ENTITY dhemail     "<email>ranfyy@gmail.com</email>">
41   <!ENTITY dhusername  "Ralf Meyer">
42   <!ENTITY dhucpackage "<refentrytitle>VIKING</refentrytitle>">
43   <!ENTITY dhpackage   "viking">
44
45   <!ENTITY debian      "<productname>Debian</productname>">
46   <!ENTITY gnu         "<acronym>GNU</acronym>">
47   <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
48 ]>
49
50 <reference>
51 <title>&dhsource; &dhversion;</title>
52
53 <refentry xmlns:xi="http://www.w3.org/2001/XInclude">
54   <refentryinfo>
55     <address>
56       &dhemail;
57     </address>
58     <copyright>
59       <year>2007</year>
60       <holder>&dhusername;</holder>
61     </copyright>
62     <copyright>
63       <year>2010</year>
64       <holder>Guilhem Bonnefille</holder>
65     </copyright>
66     <copyright>
67       <year>2013</year>
68       <holder>Rob Norris</holder>
69     </copyright>
70     &dhdate;
71   </refentryinfo>
72   <refmeta>
73     &dhucpackage;
74     &dhsection;
75     <refmiscinfo CLASS="source">&dhsource;</refmiscinfo>
76     <refmiscinfo CLASS="version">&dhversion;</refmiscinfo>
77   </refmeta>
78   <refnamediv>
79     <refname>&dhpackage;</refname>
80
81     <refpurpose>program to manage GPS data</refpurpose>
82   </refnamediv>
83   <refsynopsisdiv>
84     <cmdsynopsis>
85       <command>&dhpackage;</command>
86       <group choice="opt">
87         <arg choice="plain"><option>-d</option></arg>
88         <arg choice="plain"><option>--debug</option></arg>
89       </group>
90       <group choice="opt">
91         <arg choice="plain"><option>-V</option></arg>
92         <arg choice="plain"><option>--verbose</option></arg>
93       </group>
94       <arg rep="repeat"><replaceable>file</replaceable></arg>
95     </cmdsynopsis>
96     <cmdsynopsis>
97       <command>&dhpackage;</command>
98       <group choice="opt">
99         <arg choice="plain"><option>-h</option></arg>
100         <arg choice="plain"><option>--help</option></arg>
101       </group>
102     </cmdsynopsis>
103     <cmdsynopsis>
104       <command>&dhpackage;</command>
105       <group choice="opt">
106         <arg choice="plain"><option>-v</option></arg>
107         <arg choice="plain"><option>--version</option></arg>
108       </group>
109     </cmdsynopsis>
110   </refsynopsisdiv>
111   <refsect1>
112     <title>DESCRIPTION</title>
113
114     <para>
115       Viking is a program to manage GPS data.
116     </para>
117     <para>  
118       You can import and plot tracks, routes and waypoints, show OpenStreetMap (OSM) maps and/or
119       Terraserver maps under it, add coordinate lines, make new tracks, routes and waypoints, hide different things, etc.
120       It is written in C with the GTK+ 2 toolkit, available for Linux, other POSIX operating systems and Windows.
121     </para>
122     <para>  
123       Homepage: <ulink type="http" url="http://viking.sf.net">http://viking.sf.net</ulink>
124     </para>
125     <para>  
126       Viking is licensed under the GNU GPL.
127     </para>
128
129   </refsect1>
130   <refsect1>
131     <title>OPTIONS</title>
132
133     <variablelist>
134       <varlistentry>
135         <term><option>file</option></term>
136         <listitem>
137           <para>Specify file to load at start.</para>
138         </listitem>
139       </varlistentry>
140       <varlistentry>
141         <term><option>-d</option></term>
142         <term><option>--debug</option></term>
143         <listitem>
144           <para>Enable debug output.</para>
145         </listitem>
146       </varlistentry>
147       <varlistentry>
148         <term><option>-V</option></term>
149         <term><option>--verbose</option></term>
150         <listitem>
151           <para>Enable verbose output.</para>
152         </listitem>
153       </varlistentry>
154       <varlistentry>
155         <term><option>-?</option></term>
156         <term><option>--help</option></term>
157         <listitem>
158           <para>Show help options.</para>
159         </listitem>
160       </varlistentry>
161       <varlistentry>
162         <term><option>-v</option></term>
163         <term><option>--version</option></term>
164         <listitem>
165           <para>Show version.</para>
166         </listitem>
167       </varlistentry>
168     </variablelist>
169
170   </refsect1>
171   <refsect1>
172     <title>Extending Viking</title>
173
174       <para>Currently, &dhpackage; has some extension points based on configuration files. The file format is heavily inspired by the GtkBuilder file format: you specify the class of the GObject to build and set its properties. Technically, it is a XML file containing a "objects" root element. Inside this element, you set a collection of "object".</para>
175       <para>Here is an example:
176 <literallayout><![CDATA[
177 <objects>
178   <object class="ClassName">
179     <property name="property_name1">Property value</property>
180     <property name="property_name2">Property value</property>
181   </object>
182   ...
183 <objects>
184 ]]>
185 </literallayout>
186 </para>
187       <para>You can find more examples in the documentation part of the distribution.</para>
188       <formalpara>
189         <title>Map Source</title>
190         <para>It is possible to add new map's sources. The file is <filename>~/.viking/maps.xml</filename>.</para>
191         <para>An example of the file in the distribution <filename>doc/examples/maps.xml</filename>.</para>
192         <para>The VikSlippyMapSource allows to declare any map's source working like OpenStreetMap. It supports the following properties:
193           <variablelist>
194             <varlistentry>
195               <term>id</term>
196               <listitem><para>this is an integer and should be unique as it used to identify the map source</para></listitem>
197             </varlistentry>
198             <varlistentry>
199               <term>name</term>
200               <listitem><para>a string (should be unique) that is used for the OSM style cache directory name when the Map Cache directory is the default (<filename>~/.viking-maps</filename>)</para></listitem>
201             </varlistentry>
202             <varlistentry>
203               <term>label</term>
204               <listitem><para>the text displayed in the map's source selection dialog</para></listitem>
205             </varlistentry>
206             <varlistentry>
207               <term>hostname</term>
208               <listitem><para>the server's hostname (eg. "tile.openstreetmap.org")</para></listitem>
209             </varlistentry>
210             <varlistentry>
211               <term>url</term>
212               <listitem><para>the parametrized address of the tile, in the spirit of C printf format, with 3 "%d" fields for Z, X and Y (in that order) (eg. "/%d/%d/%d.png")</para></listitem>
213             </varlistentry>
214             <varlistentry>
215               <term>zoom-min (optional)</term>
216               <listitem><para>The minimum zoom value supported by the tile server. The Default is 0 if not specified.</para></listitem>
217             </varlistentry>
218             <varlistentry>
219               <term>zoom-max (optional)</term>
220               <listitem>
221                  <para>The maximum zoom value supported by the tile server. The Default is 18 if not specified.</para>
222                  <para>See <ulink url="http://wiki.openstreetmap.org/wiki/Zoom_levels">Zoom Levels</ulink></para>
223               </listitem>
224             </varlistentry>
225             <varlistentry>
226               <term>lat-min (optional)</term>
227               <listitem><para>The minimum latitude value in degrees supported by the tile server. The Default is -90 degrees if not specified.</para></listitem>
228             </varlistentry>
229             <varlistentry>
230               <term>lat-max (optional)</term>
231               <listitem><para>The maximum latitude value in degrees supported by the tile server. The Default is 90 degrees if not specified.</para></listitem>
232             </varlistentry>
233             <varlistentry>
234               <term>lon-min (optional)</term>
235               <listitem><para>The minimum longitude value in degrees supported by the tile server. The Default is -180 degrees if not specified.</para></listitem>
236             </varlistentry>
237             <varlistentry>
238               <term>lon-max (optional)</term>
239               <listitem><para>The maximum longitude value in degrees supported by the tile server. The Default is 180 degrees if not specified.</para></listitem>
240             </varlistentry>
241             <varlistentry>
242               <term>file-extension (optional)</term>
243               <listitem>
244                 <para>The file extension of the files on disk. The default is <emphasis>.png</emphasis></para>
245                 <para>If the tile source URL ends in something other than .png, then this parameter will need to match it.</para>
246                 <para>This can also be useful in reading a tileset from other software which may name tiles in an alternative form,
247                       e.g. for Mobile Atlas creator it names them <emphasis>.png.tile</emphasis></para>
248                 <note><para>The file types actually usable are those supported by GDK Pixbuf Library, which includes at least PNG and JPEG.</para></note>
249                 <note><para>Remember to include the beginning <emphasis>'.'</emphasis> when specifying this parameter.</para></note>
250               </listitem>
251             </varlistentry>
252             <varlistentry>
253               <term>switch-xy (optional)</term>
254               <listitem>
255                 <para>Swap the X,Y values around in the URL parametrized ordering.</para>
256                 <para>The default is false.</para>
257               </listitem>
258             </varlistentry>
259             <varlistentry>
260               <term>check-file-server-time (optional)</term>
261               <listitem>
262                 <para>Sends the timestamp of the tile to the server, so the server can decide whether it should send a new tile or not.</para>
263                 <para>The default is false.</para>
264               </listitem>
265             </varlistentry>
266             <varlistentry>
267               <term>use-etag (optional)</term>
268               <listitem>
269                 <para>Use and compare the <ulink url="http://en.wikipedia.org/wiki/HTTP_ETag">ETag</ulink> value in determining whether to download a newer tile. The default is false.</para>
270                 <para>The ETag value is stored in a separate file in the same directory as the tile to enable checking the value across multiple runs of the program.</para>
271               </listitem>
272             </varlistentry>
273           </variablelist>
274         </para>
275         <para>The VikTmsMapSource allows to declare any TMS service. It supports the following properties (as per VikSlippyMapSource above):
276           <variablelist>
277             <varlistentry>
278               <term>id</term>
279             </varlistentry>
280             <varlistentry>
281               <term>label</term>
282             </varlistentry>
283             <varlistentry>
284               <term>hostname</term>
285             </varlistentry>
286             <varlistentry>
287               <term>url</term>
288             </varlistentry>
289             <varlistentry>
290               <term>check-file-server-time (optional)</term>
291             </varlistentry>
292             <varlistentry>
293               <term>zoom-min (optional)</term>
294             </varlistentry>
295             <varlistentry>
296               <term>zoom-max (optional)</term>
297             </varlistentry>
298             <varlistentry>
299               <term>lat-min (optional)</term>
300             </varlistentry>
301             <varlistentry>
302               <term>lat-max (optional)</term>
303             </varlistentry>
304             <varlistentry>
305               <term>lon-min (optional)</term>
306             </varlistentry>
307             <varlistentry>
308               <term>lon-max (optional)</term>
309             </varlistentry>
310           </variablelist>
311         </para>
312         <para>The VikWmscMapSource allows to declare any WMS or WMS-C service. It supports the following properties  (as per VikSlippyMapSource above):
313           <variablelist>
314             <varlistentry>
315               <term>id</term>
316             </varlistentry>
317             <varlistentry>
318               <term>label</term>
319             </varlistentry>
320             <varlistentry>
321               <term>hostname</term>
322             </varlistentry>
323             <varlistentry>
324               <term>url</term>
325             </varlistentry>
326             <varlistentry>
327               <term>check-file-server-time (optional)</term>
328             </varlistentry>
329             <varlistentry>
330               <term>zoom-min (optional)</term>
331             </varlistentry>
332             <varlistentry>
333               <term>zoom-max (optional)</term>
334             </varlistentry>
335             <varlistentry>
336               <term>lat-min (optional)</term>
337             </varlistentry>
338             <varlistentry>
339               <term>lat-max (optional)</term>
340             </varlistentry>
341             <varlistentry>
342               <term>lon-min (optional)</term>
343             </varlistentry>
344             <varlistentry>
345               <term>lon-max (optional)</term>
346             </varlistentry>
347           </variablelist>
348         </para>
349       </formalpara>
350
351       <formalpara>
352         <title>Go-to search engines</title>
353         <para>It is possible to add new new search engines for the "Go-To" feature. The file is <filename>~/.viking/goto_tools.xml</filename>.</para>
354         <para>An example of the file in the distribution <filename>doc/examples/goto_tools.xml</filename>.</para>
355         <para>Currently, there is a single object class available: VikGotoXmlTool. Such feature allows to declare any search engine using a XML format as result.</para>
356         <para>The related properties are:
357           <variablelist>
358             <varlistentry>
359               <term>label</term>
360               <listitem><para>the text displayed in the <guilabel>Go-To</guilabel> dialog</para></listitem>
361             </varlistentry>
362             <varlistentry>
363               <term>url-format</term>
364               <listitem><para>the parametrized address of the query, in the spirit of C <function>printf</function> format, with a single "%s" field (replaced by the query string)</para></listitem>
365             </varlistentry>
366             <varlistentry>
367               <term>lat-path</term>
368               <listitem><para>XML path of the latitude (eg. <literal>/root/parent/elem</literal>)</para></listitem>
369             </varlistentry>
370             <varlistentry>
371               <term>lat-attr (optional)</term>
372               <listitem><para>name of the attribute (of previous element) containing the latitude</para></listitem>
373             </varlistentry>
374             <varlistentry>
375               <term>lon-path</term>
376               <listitem><para>XML path of the longitude (eg. <literal>/root/parent/elem</literal>)</para></listitem>
377             </varlistentry>
378             <varlistentry>
379               <term>lon-attr (optional)</term>
380               <listitem><para>name of the attribute (of previous element) containing the longiude</para></listitem>
381             </varlistentry>
382           </variablelist>
383         </para>
384         <para>As a facility (or readability) it is possible to set both path and attribute name in a single property, like an XPath expression. To do so, simply set both info in lat-path (or lon-path) in the following format: <literal>/root/parent/elem@attribute</literal>.</para>
385       </formalpara>
386
387       <formalpara>
388         <title>External tools</title>
389         <para>It is possible to add new external tools. The file is <filename>~/.viking/external_tools.xml</filename>.</para>
390         <para>An example of the file in the distribution <filename>doc/examples/external_tools.xml</filename>.</para>
391         <para>The VikWebtoolCenter allows to declare any Webtool using a logic based on center coordinates and zoom level value.</para>
392         <para>The related properties are:
393           <variablelist>
394             <varlistentry>
395               <term>label</term>
396               <listitem><para>the text displayed in the menu entry</para></listitem>
397             </varlistentry>
398             <varlistentry>
399               <term>url</term>
400               <listitem><para>the parametrized URL to open, in the spirit of C printf format, with 2 "%s" and a "%d" fields for X, Y and Z (zoom level) (eg. "http://hostname/?lat=%s&amp;lon=%s&amp;zoom=%d")</para></listitem>
401             </varlistentry>
402           </variablelist>
403         </para>
404         <para>The VikWebtoolBounds allows to declare any Webtool using a logic based on bounds coordinates.</para>
405         <para>The related properties are:
406           <variablelist>
407             <varlistentry>
408               <term>label</term>
409               <listitem><para>the text displayed in the menu entry</para></listitem>
410             </varlistentry>
411             <varlistentry>
412               <term>url</term>
413               <listitem><para>the parametrized address of the tile, in the spirit of C printf format, with 4 "%s" fields for left, right, bottom and top (eg. "http://hostname:8111/load_and_zoom?left=%s&amp;right=%s&amp;bottom=%s&amp;top=%s")</para></listitem>
414             </varlistentry>
415           </variablelist>
416         </para>
417       </formalpara>
418
419       <formalpara>
420         <title>Remote File Datasources</title>
421         <para>It is possible to add web references expected to return a file which can then be opened directly or converted via GPSBabel.</para>
422         <para>The file is <filename>~/.viking/datasources.xml</filename>.</para>
423         <para>An example of the file is in the source distribution <filename>doc/examples/datasources.xml</filename>.</para>
424         <para>The VikWebtoolDatasource allows to declare any URL using logic based on coordinates.</para>
425         <para>The related properties are:
426           <variablelist>
427             <varlistentry>
428               <term>label</term>
429               <listitem><para>the text displayed in the menu entry</para></listitem>
430             </varlistentry>
431             <varlistentry>
432               <term>url</term>
433               <listitem>
434                 <para>the parametrized URL to open in the spirit of C printf format, with up to 7 "%s" values. e.g. <literal>http://hostname/getfile?lat=%s&amp;lon=%s</literal></para>
435                 <para>The order and meaning of these parameters is given by the url_format_code below</para>
436               </listitem>
437             </varlistentry>
438             <varlistentry>
439               <term>url_format_code</term>
440               <listitem>
441                 <para>A string describing the parametrized URL substitution parameters, each character represents how to translate each term.</para>
442                 <para>B = Bottom of the current view i.e. minimum latitude</para>
443                 <para>L = Left of the current view i.e. minimum longitude</para>
444                 <para>T = Top of the current view i.e. maximum latitude</para>
445                 <para>R = Right of the current view i.e. maximum longitude</para>
446                 <para>A = center lAtitude of the current view</para>
447                 <para>O = center lOngitude of the current view</para>
448                 <para>Z = OSM Zoom value of the current view. See <ulink url="http://wiki.openstreetmap.org/wiki/Zoom_levels">Zoom Levels</ulink></para>
449                 <para>S = A user specified input string requested from the user via a dialog box</para>
450                 <para>Thus for the url example above then the format code should be <emphasis>AO</emphasis></para>
451               </listitem>
452             </varlistentry>
453             <varlistentry>
454               <term>file_type</term>
455               <listitem>
456                 <para>This value is passed on for the -i parameter in interfacing with GPSBabel.</para>
457                 <para>If it is not defined then the returned file is interpreted internally as a GPX file.</para>
458                 <para>Possible values such as 'kml', 'mapsource' etc.. can be used. See <ulink url="http://www.gpsbabel.org/capabilities.html">GPSBabel File Formats</ulink> for the full list.</para>
459               </listitem>
460             </varlistentry>
461             <varlistentry>
462               <term>babel_filter_args</term>
463               <listitem>
464                 <para>This value is passed on for the filter arguments interfacing with GPSBabel.</para>
465                 <para>E.g. "-x nuketypes,routes" can be used to filter all routes from the results.</para>
466               </listitem>
467             </varlistentry>
468              <varlistentry>
469               <term>input_label</term>
470               <listitem>
471                 <para>This value is used when requesting input from the user.</para>
472                 <para>It is the label of the text input box.</para>
473               </listitem>
474             </varlistentry>
475           </variablelist>
476         </para>
477       </formalpara>
478
479   </refsect1>
480   <refsect1>
481     <title>FILES</title>
482
483     <variablelist>
484       <varlistentry>
485         <term><filename>~/.viking/maps.xml</filename></term>
486         <listitem>
487           <para>File containing definition of map sources.</para>
488           <para>See previous section for details.</para>
489        </listitem>
490       </varlistentry>
491       <varlistentry>
492         <term><filename>~/.viking/goto_tools.xml</filename></term>
493         <listitem>
494           <para>File containing definition of "Go-to" services.</para>
495           <para>See previous section for details.</para>
496        </listitem>
497       </varlistentry>
498       <varlistentry>
499         <term><filename>~/.viking/external_tools.xml</filename></term>
500         <listitem>
501           <para>File containing definition of external tools.</para>
502           <para>See previous section for details.</para>
503        </listitem>
504       </varlistentry>
505       <varlistentry>
506         <term><filename>~/.viking/datasources.xml</filename></term>
507         <listitem>
508           <para>File containing definition of remote file datasources.</para>
509           <para>See previous section for details.</para>
510        </listitem>
511       </varlistentry>
512       <varlistentry>
513         <term><filename>~/.viking/viking.prefs</filename></term>
514         <listitem>
515           <para>Preferences for &dhpackage;.</para>
516         </listitem>
517       </varlistentry>
518       <varlistentry>
519         <term><filename>~/.viking/viking_layer_defaults.ini</filename></term>
520         <listitem>
521           <para>Layer default values for &dhpackage;.</para>
522         </listitem>
523       </varlistentry>
524       <varlistentry>
525         <term><filename>~/.viking/viking.ini</filename></term>
526         <listitem>
527           <para>Values for &dhpackage; automatically saved between sessions.</para>
528           <para>Not generally intended to be manually edited.</para>
529           <para>However some finer control of default internal values can be set.</para>
530         </listitem>
531       </varlistentry>
532       <varlistentry>
533         <term><filename>~/.viking/cookies.txt</filename></term>
534         <listitem>
535           <para>File hosting cookies used by &dhpackage;.</para>
536         </listitem>
537       </varlistentry>
538       <varlistentry>
539         <term><filename>~/.viking-maps/</filename></term>
540         <listitem>
541           <para>Map cache of tiles downloaded by &dhpackage;.</para>
542         </listitem>
543       </varlistentry>
544     </variablelist>
545
546         <para>Extension files (<filename>maps.xml</filename>,
547         <filename>goto_tools.xml</filename>,
548         <filename>datasources.xml</filename>,
549         <filename>external_tools.xml</filename>)
550         are also searched in <filename>/etc/viking</filename> and
551         <filename>/usr/share/viking</filename> directories (or related in your system).</para>
552
553   </refsect1>
554   <refsect1>
555     <title>ENVIRONMENT</title>
556
557     <variablelist>
558       <varlistentry>
559         <term><envar>XDG_DATA_HOME</envar></term>
560         <listitem>
561           <para>Optional directory to look for extension files
562           (<filename>maps.xml</filename>, <filename>goto_tools.xml</filename>,
563           <filename>external_tools.xml</filename>).</para>
564        </listitem>
565       </varlistentry>
566       <varlistentry>
567         <term><envar>XDG_DATA_DIRS</envar></term>
568         <listitem>
569           <para>Path used to change the directories scanned for extension files
570           (<filename>maps.xml</filename>, <filename>goto_tools.xml</filename>,
571           <filename>external_tools.xml</filename>).</para>
572        </listitem>
573       </varlistentry>
574     </variablelist>
575
576   </refsect1>
577   <refsect1>
578     <title>AUTHOR</title>
579
580     <para>This manual page was originally written by &dhusername; &dhemail; for
581       the &debian; system (but may be used by others).  Permission is
582       granted to copy, distribute and/or modify this document under
583       the terms of the &gnu; General Public License, Version 2 any 
584           later version published by the Free Software Foundation.
585     </para>
586         <para>
587           On Debian systems, the complete text of the GNU General Public
588           License can be found in /usr/share/common-licenses/GPL.
589         </para>
590
591   </refsect1>
592 </refentry>
593 </reference>