<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY appname          "Viking">
  <!ENTITY app "<application>Viking</application>">
  <!ENTITY appversion   "1.10">
  <!ENTITY manrevision  "1.10">
  <!ENTITY date "November 2021">
  <!ENTITY extfiles    "<filename>maps.xml</filename>, <filename>goto_tools.xml</filename>, <filename>datasources.xml</filename>, <filename>external_tools.xml</filename>, <filename>routing.xml</filename>">
]>
<!-- =============Document Header ============================= -->
<article id="index" lang="en">
  <articleinfo>
    <title>&app; Manual</title>
    <abstract role="description">
      <para>&app; is a free/open source program to manage GPS data.</para>
    </abstract>

    <copyright>
      <year>2020</year>
      <holder>Guilhem Bonnefille</holder>
      <holder>Rob Norris</holder>
    </copyright>

    <!-- An address can be added to the publisher information. -->
    <publisher role="maintainer">
      <publishername>Viking Project</publishername>
    </publisher>

    <xi:include href="legal.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <!-- The file legal.xml contains link to license for the documentation,
        and other legal stuff such as "NO WARRANTY" statement.
        Please do not change any of this. -->

    <authorgroup>
      <author>
        <firstname>Guilhem</firstname>
        <surname>Bonnefille</surname>
      </author>
      <author>
        <firstname>Rob</firstname>
        <surname>Norris</surname>
      </author>
      <!-- Contributors from the Wiki history -->
      <author>
        <firstname>username:</firstname>
        <surname>Alexxy</surname>
      </author>
      <author>
        <firstname>username:</firstname>
        <surname>Vikingis</surname>
      </author>
      <author>
        <firstname>username:</firstname>
        <surname>Tallguy</surname>
      </author>
      <author>
        <firstname>username:</firstname>
        <surname>EliotB</surname>
      </author>
      <author>
        <firstname>Alex</firstname>
        <surname>Foobarian</surname>
      </author>
      <!-- END -->
    </authorgroup>

    <revhistory>
      <revision>
        <revnumber>&appname; Manual V&manrevision;</revnumber>
        <date>&date;</date>
        <revdescription>
          <para role="author">Guilhem Bonnefille <email>guilhem.bonnefille@gmail.com</email></para>
          <para role="author">Rob Norris <email>rw_norris@hotmail.com</email></para>
          <para role="publisher">GNOME Documentation Project</para>
          <para>This document was generated on <?dbtimestamp format="Y-m-d"?>.</para>    
        </revdescription>
      </revision>
    </revhistory>

    <releaseinfo>This manual describes version &appversion; of &appname;.</releaseinfo>

    <legalnotice>
      <title>Feedback</title>
      <para>To report a bug or make a suggestion regarding the &app; application or
      this manual, follow the directions in the
      <ulink url="https://sourceforge.net/projects/viking/">Project Website</ulink>.
      </para>
    </legalnotice>
  </articleinfo>

  <indexterm zone="index">
    <primary>&app;</primary>
  </indexterm>
<!-- ============= Document Body ============================= -->
<section id="Introduction"><title>Introduction</title>
<para>
&appname; aims to be easy to use, yet powerful in accomplishing a wide
variety of tasks. Some of the things you can use &appname; for are:
</para>
<itemizedlist mark="opencircle"><listitem>
<para>
Uploading and downloading waypoints, tracks and routes to/from GPS.
</para>
</listitem>
<listitem>
<para>Preparing tracks, routes and waypoints for trips using maps from services such as OpenStreetMap (OSM).
The data is only needed to be uploaded to your GPS before you leave.
The maps together with your tracks, routes and waypoints can also be printed and used during the trip.
</para>
</listitem>
<listitem>
<para>
After trips, tracks and waypoints from GPS can be downloaded, stored, managed and reused in your (or your friends') later trips.
</para>
</listitem>
<listitem>
<para>
Analyzing Off Highway Vehicle (OHV) and hiking trips, understanding where you went and how far you were from something.
</para>
</listitem>
<listitem>
<para>Making waypoints, tracks and routes to follow to easily get some place
you've never been before or don't have GPS data for but online
maps exist for it.
</para>
</listitem>
<listitem>
<para>
Making maps with using <ulink url="https://mapnik.org/">Mapnik</ulink>.
Not on <trademark>Windows</trademark> at the moment.
</para>
</listitem>
<listitem>
<para>
Grouping data from multiple trips using a hierarchical data manager.
</para>
</listitem>
<listitem>
<para>
Analyzing speed at different places (to some degree), adding waypoints where you forgot to mark one but did slow down or stop.
</para>
</listitem>
<listitem>
<para>
Downloading and storing OpenStreetMap and/or other map types on your hard drive and looking at them later.
</para>
</listitem>
<listitem>
<para>
Editing routes or tracks and their trackpoints, joining and splitting up tracks and routes.
</para>
</listitem>
<listitem>
<para>
Show the live GPS position on the map (for use on a mobile device - e.g. a laptop). Not <trademark>Windows</trademark> at the moment.
</para>
</listitem>
<listitem>
<para>
Import and export track, route and waypoint files of various types via <application>GPSBabel</application>
</para>
<note>
<para>
Previously on <trademark>Windows</trademark>, <application>GPSBabel</application> was distributed with &appname;, but this no longer the case.
</para>
<para>
It can be downloaded from its website <ulink url="https://www.gpsbabel.org"></ulink>.
</para>
</note>
</listitem>
<listitem>
<para>
View, create and update Geotagged Images (using EXIF data).
</para>
</listitem>
</itemizedlist>
<note>
<para>
&appname; is under continual improvement: see the  the <ulink url="https://sourceforge.net/p/viking/wikiallura/Main_Page/#todo-ideas"><citetitle>Roadmap / Wishlist</citetitle></ulink>:
</para>
</note>
<figure>
<title>Screenshot: OSM Cycle Map and Many Tracks</title>
<screenshot>
  <graphic format="JPG" fileref="figures/Viking-OSM-CycleMap-ManyTracks.jpg"/>
</screenshot>
<informalexample>
<para>
Here the toolbar is on the same line as the Menubar.
This is set via the <xref linkend="prefs"/> <menuchoice><guimenu>Toolbar</guimenu><guisubmenu>Append to Menu</guisubmenu></menuchoice> setting.
</para>
</informalexample>
</figure>
<section id="Flatpak"><title>Flatpak Version</title>
<para>
  &appname; is now available for use in Linux as a Flatpak, however since &appname; is running in a sandbox some system integration features no longer work properly in the Flatpak runtime.
</para>
<para>
  See the file <filename>FLATPAK.md</filename> in the top level of the source distribution for more detail.
</para>
</section>
</section>

<section id="GeneralConcepts"><title>General Concepts</title>
<section id="gc_layers" xreflabel="Layers"><title>Layers</title>
<para>
<emphasis>Layers</emphasis> is concept one may know from powerful graphics editors such as <application>Photoshop</application> or <application>GIMP</application>.
Instead of putting all the data on the same level, it is stacked (i.e. layered) with different data over one another.
This can be useful for analysis and general handling of various sets of data.
</para>
<para>
Unfortunately the downside of this complexity is remembering how differing layers of data can obscure other data.
</para>
<para id="Alpha" xreflabel="Alpha">
The Map layers and various other image features have <ulink url="https://en.wikipedia.org/wiki/Alpha_compositing"><citetitle>Alpha Compositing</citetitle></ulink>,
to create the appearance of partial transparency.
This is a value between 0 and 255 with the default being 255 for a fully solid image, whereas 0 is fully transparent.
By controlling this value one can see data below it in the layer hierarchy for interesting effects. A value of around 160 can be useful for blending views.
</para>
</section>
<section id="gc_layers_panel" xreflabel="Layers Panel"><title>Layers Panel</title>
<para>
The panel on the left is called the <emphasis role="bold">layers panel</emphasis>.
It determines which layers and sublayers (such as tracks and waypoints)
are shown, and the order in which they are drawn. Layers on the
top of the layers panel list are drawn last. You can change the order by
drag and drop, or by selecting a layer and using the up and down
buttons at the bottom of the layers panel.
</para>
<para>
  The panel also contains tabs for <xref linkend="Calendar"/>, <xref linkend="Goto"/> and <xref linkend="PanelStats"/> features.
</para>
</section>
<section id="viewport"><title>Viewport</title>
<para>
The main &appname; area where the layer data is drawn, is called the <emphasis role="bold">viewport</emphasis>.
</para>
<para>
This will typically include a <xref linkend="Map"/> layer with a default map created as standard.
</para>
<para>
Using the mouse (and keyboard) you can move and zoom the viewport or select items on view.
See the <xref linkend="tools"/> section for further details about different modes and the various control options supported.
</para>
</section>
<section><title>Track Graphs</title>
<para>
Below the viewport can be shown track (and route) elevation/distance and time/speed (tracks only) graphs of the selected item.
These are the same graphs as shown in <xref linkend="track_properties"/>.
The graphs will automatically hide itself when nothing or no suitable item is selected.
</para>
<para>
Moving the mouse pointer over the graphs will show a tooltip readout of the nearest trackpoint.
Similarly to the track properties graphs, left clicking will center the viewport on the trackpoint.
A right click menu offers controls of the drawing options, a subset of track operations and access to further information dialogs.
</para>
</section>
<section id="Statusbar"><title>Statusbar</title>
<para>This provides a readout of various information:</para>
<itemizedlist>
<listitem><para>The currently selected (mouse pointer) tool</para></listitem>
<listitem><para>The number of items to process in the background - normally this the number in the map tile download queue</para></listitem>
<listitem><para>The zoom level</para></listitem>
<listitem><para>The location of the mouse pointer (and potentially height information if <xref linkend="DEM"/> data is available)</para></listitem>
<listitem><para>The number of log messages</para></listitem>
<listitem><para>A general feedback area, such as the result of an operation or information about the selected item</para></listitem>
</itemizedlist>
<para>E.g. when creating a track/route, the general feedback area displays some information about the track/route.</para>
<figure>
<title>Statusbar</title>
<screenshot>
  <graphic format="PNG" fileref="figures/trw_statusbar.png"/>
</screenshot>
</figure>
<para>This part of the statusbar displays:
<itemizedlist>
<listitem><para>The total distance of the track/route (including currently edited segment).</para></listitem>
<listitem><para>The bearing of the currently edited segment.</para></listitem>
<listitem><para>The distance of the currently edited segment.</para></listitem>
</itemizedlist>
</para>
<para>Left clicking on the number of background processes opens a dialog from which the processes can be inspected and cancelled.</para>
<para>Left clicking on the number of log messages opens a dialog from which the messages can be viewed, filtered, copied and cleared.
Newest messages are put at the top of the list.</para>
<para>For convenience, a zoom selector can be opened from the status bar. Simply left-click on the zoom level.</para>
<figure>
  <title>The zoom selector available from status bar</title>
  <screenshot>
    <graphic format="PNG" fileref="figures/zoom_status_popup.png"/>
  </screenshot>
</figure>
</section>

<section id="toolbar" xreflabel="Toolbar"><title>Toolbar</title>
<para>The toolbar is an area for buttons that perform common actions.</para>
<para>Some actions are modal, so the appropriate layer needs selected before these toolbar buttons are enabled. See <xref linkend="tools"/> more detail.</para>
<para>The display of the toolbar is influenced by the <xref linkend="prefs_toolbar"/></para>
<para>Right clicking on the toolbar and selecting <menuchoice><guimenu>Customize</guimenu></menuchoice> allows jumping to the <xref linkend="prefs_toolbar_customize"/> directly.</para>
</section>

<section id="projection" xreflabel="Projection"><title>Projections</title>
<para>
&appname; supports different projections:
<itemizedlist>
<listitem>
<para>UTM</para>
</listitem>
<listitem>
<para>LatLon (also called EPSG:4326)</para>
</listitem>
<listitem>
<para>Mercator (also called Spherical Mercator)</para>
</listitem>
</itemizedlist>
</para>
</section>

<section id="zoom" xreflabel="Zoom Level"><title>Zoom Level</title>
<para>
&appname; uses a zoom level measured as a pixel factor in Metres Per Pixel (MPP), hence this may also be referred to as a zoom factor. By default in this document the zoom level refers to &appname;'s MPP definition unless otherwise stated.
</para>
<para>
This is in contrast to Tiled Web Map systems such as OpenStreetMap which use the <ulink url="https://wiki.openstreetmap.org/wiki/Zoom_levels">Zoom Level</ulink> as a measure of how much of the world is visible on the map.
</para>
</section>

<section id="mapcache" xreflabel="Map Cache"><title>Map Cache</title>
<para>
&appname; stores downloaded map tiles to disk for a couple of reasons:
</para>
<itemizedlist>
<listitem><para>Enables off line usage</para></listitem>
<listitem><para>Reduces loading on the map tile provider</para></listitem>
</itemizedlist>
<para>
The &appname; automatic caching strategy is two fold:
</para>
<itemizedlist>
<listitem>
<para>
  If the age of the tile on disk is less than the specified tile age (see <xref linkend="prefs"/>),
  it will <emphasis>not</emphasis> attempt to contact the server to get a new version of the tile.
</para>
</listitem>
<listitem>
<para>
  When the tile age has expired &appname; will attempt a <emphasis>refresh</emphasis> update, so that it provides the cached tile generation timestamp so the server can determine if a new tile image needs to be returned. Not all map types support this refresh method.
</para>
</listitem>
</itemizedlist>
<para>
  You can override the caching scheme by using right-click on the Map on the layers panel and selecting <guimenuitem>Redownload All Onscreen Maps</guimenuitem>, or <keycap>Ctrl+F5</keycap> for the top most map displayed. This will get the latest version held by the server.
</para>
<note>
<para>
  This can be useful if you contribute to OpenStreetMap and wish to see your modifications (of course give time for the server to have processed your changes - see <ulink url="https://help.openstreetmap.org/questions/102/i-have-made-edits-but-they-dont-show-up-on-the-map">I have made edits but they don't show up on the map</ulink>)
</para>
</note>

<para>
The layout of the cache on disk itself can be controlled via a per Map Layer property.
<itemizedlist>
<listitem><para>Viking - Legacy default in a private cache layout scheme</para></listitem>
<listitem><para>OSM - Newer available default (1.6+)</para>
<para>
This is to increase the compatibility between &appname; and similar applications that cache tiles on disk so that the tiles can be shared.
</para>
</listitem>
</itemizedlist>

</para>
</section>

<section id="shortcut_keys" xreflabel="Shortcut Keys"><title>Shortcut Keys</title>
<para>
&appname; has several shortcut keys or key combinations for commands as listed in the main window along side the command.
</para>
<para>
By default some function keys follow standard GUI behaviour:
</para>
<itemizedlist>
<listitem><para><keycap>F1</keycap> Help (view this manual)</para></listitem>
<listitem><para><keycap>F5</keycap> or <keycap>Ctrl+R</keycap> Refresh the maps on screen</para></listitem>
<listitem><para><keycap>F10</keycap> Select the Menubar (in built behaviour)</para></listitem>
<listitem><para><keycap>F11</keycap> Full Screen</para></listitem>
<listitem><para><keycap>Ctrl+F5</keycap> or <keycap>Ctrl+Shift+R</keycap> Redownload the maps on screen</para></listitem>
</itemizedlist>
<note>
<para>
Refresh attempts to get new maps only if the local tile cache time period has expired for any particular map tile.
Redownload gets all on screen maps from the server, ignoring the local tile cache.
</para>
</note>
<para>
Other function keys control turn on/off visibility of various elements:
</para>
<itemizedlist>
<listitem><para><keycap>F3</keycap> Toggle visibility of the Toolbar</para></listitem>
<listitem><para><keycap>F4</keycap> Toggle visibility of the Menubar</para></listitem>
<listitem><para><keycap>Shift+F5</keycap> Toggle visibility of the Scale indicator on the viewport</para></listitem>
<listitem><para><keycap>F6</keycap> Toggle visibility of the Center Crosshairs on the viewport</para></listitem>
<listitem><para><keycap>F7</keycap> Toggle showing selected items (e.g. tracks or waypoints) in the highlight colour in the viewport</para></listitem>
<listitem><para><keycap>Shift+F8</keycap> Toggle visibility of the calendar</para></listitem>
<listitem><para><keycap>Shift+F9</keycap> Toggle visibility of the Layers Panel buttons</para></listitem>
<listitem><para><keycap>F9</keycap> Toggle visibility of the Layers Panel</para></listitem>
<listitem><para><keycap>F12</keycap> Toggle visibility of the Statusbar</para></listitem>
<listitem><para><keycap>Shift+F12</keycap> Toggle visibility of the Track Graphs</para></listitem>
</itemizedlist>
<para>
Standard shortcuts are provided for normal GUI operations: such as creating new files, opening, saving and exiting.
Then there are shortcuts specific to &appname; to switch projection modes, zoom in/out, create layers, switch the active tool mode and move the map:
</para>
<itemizedlist>
<listitem><para><keycap>Ctrl+Up</keycap> Pan the viewport North</para></listitem>
<listitem><para><keycap>Ctrl+Right</keycap> Pan the viewport East</para></listitem>
<listitem><para><keycap>Ctrl+Down</keycap> Pan the viewport South</para></listitem>
<listitem><para><keycap>Ctrl+Left</keycap> Pan the viewport West</para></listitem>
<listitem><para><keycap>Ctrl+Keypad+</keycap> Zoom In</para></listitem>
<listitem><para><keycap>Ctrl+Keypad-</keycap> Zoom Out</para></listitem>
</itemizedlist>
<important><para>These work irrespective of the <xref linkend="tools"/> mode selected</para></important>
<para>
  <keycap>Up</keycap>,<keycap>Left</keycap>,<keycap>Right</keycap> and <keycap>Down</keycap> also pan the viewport in the respective direction when any of the primary window tools is active (<xref linkend="selecttool"/> (when nothing is selected), <xref linkend="pantool"/>, <xref linkend="zoomtool"/> or <xref linkend="rulertool"/>)
</para>
<para>
For other combinations see the menu entry themselves.
</para>
</section>

<section>
<title>Keyboard Configuration</title>
<para>Keyboard configuration is supported by the standard GTK+ way of changing shortcuts for menu entries.</para>
<para>Hover over the menu option with the mouse pointer and press the keyboard shortcut you want to bind it to.</para>
<para>To delete a keyboard assignment, press <keycap>Backspace</keycap> whilst over the menu entry.</para>
<note>
<para>
	If the keyboard shortcut is already in use you will not receive any notification that new action replaces the old action.
	This is probably why most distributions have this facility disabled by default.
	Thus you will need to enable <emphasis>Editable menu accelerators</emphasis> for your system.
	Check the Desktop Menu and Toolbar Control or other User Interface preferences for this setting.
</para>
</note>
<note>
<para>
	For Windows systems this can be done by adding the line <emphasis>gtk-can-change-accels=1</emphasis> to <filename>%USERPROFILE%\.gtkrc-3.0</filename> (create the file if it does not exist).
</para>
</note>
<para>From &app; 1.6+ the keyboard configuration is automatically loaded and saved between sessions in the <xref linkend="config_keys"/></para>
</section>

<section><title>Tracks vs Routes</title>
<para>
In theory a route is path you are planning to follow and a track is of where you have actually been. The GPX specification splits these into two separate categories, although tracks contain everything a route may have.
</para>
<para>
Q. When planning a <emphasis>route</emphasis> what difference does it make if it's a route or a track?
</para>
<para>
A. One difference is in how a GPS device navigates following the route or track.
The capability, the options and data on a particular device also effect how the navigation is performed.
Often the how a device actually works doesn't seem to be formally documented by the manufacturer (and can be firmware dependent too).
Web searches can reveal people's experiences with specific devices on blogs and various forums.
For some devices it will attempt to navigate between route points, which may then suggest various roads and tracks between the points using an internal routing algorithm with some kind of transport profile.
However this is limited to the quality of data available and how well the profile matches ones actual need.
If the points are close enough then the 'best' route for any form of transport will typically be the straight line between the points.
</para>
<note><para>
There are often restrictions on the numbers of route (or track) points the GPS Device can handle - may be 250 or as little as 50.
This generally not a problem for shorter routes, but needs managing for longer or detailed routes.
The number of track points is normally alot higher (e.g. 500 or typically with latest devices 10,000 or more) and less of a problem.
</para>
<para>
  See <xref linkend="gpx_simplify"/> for help to manage this.
</para></note>
</section>

</section><!--General Concepts End-->

<section id="FileTypes" ><title>File Types and the Main Window</title>

<para>
&appname; has it's own file type traditionally marked by the <emphasis>.vik</emphasis> file extension.
This is a plain text file saving all information of the current window including the view location, zoom level, projection type and then all the layer information (aggregates, maps, tracks, waypoints, etc...).
</para>
<para>
Besides it's own file type, &appname; can open (and save to via export methods) GPX, TCX and KML file types.
</para>
<note>
<para>
Extensions from GPX 1.1 are supported in a read/write only fashion; with viewing of the raw data (i.e. no editing).
The arbitrary extension information is not saved in .vik format files.
</para>
<para>
Specific GPX 1.1 extensions such as heart rate, cadence, temperature and power are supported for viewing (including overview graphs) and these values will also be saved in .vik format files.
</para>
</note>
<para>
By default &appname; opens a window centered on the home location with the default <xref linkend="Map"/>. This behaviour can be changed by the <xref linkend="prefs_startup"/>.
Each window contains menus, a toolbar, a viewport, layers panel and a statusbar.
Each section (apart from the viewport) can be hidden using the <xref linkend="shortcut_keys"/> or from the
<menuchoice><guimenu>View</guimenu><guisubmenu>Show</guisubmenu></menuchoice> choices.
</para>
<para>
One may consider each &appname; window to be a separate project - each with it's project <emphasis>Viking</emphasis> file.
However generally one window is enough for most purposes!
</para>
<para>
  To indicate when changes have been made the name is preceded by an '*'.
</para>
<para>
Several operations apply at the window level as follows next.
Also see <xref linkend="tools"/> for the operational modes that generally work in conjunction with a selected layer.
</para>

<section><title>New</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu></menuchoice> menu and on the toolbar <guibutton>New</guibutton>.
</para>
<para>
This creates a new window with the default settings.
</para>
</section>

<section><title>Open</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Open</guisubmenu></menuchoice> menu and on the toolbar <guibutton>Open</guibutton>.
</para>
<para>
This opens a file chooser dialog to select one (or more) files of the supported GPS data file types:
<itemizedlist>
<listitem><para>Viking</para></listitem>
<listitem><para>GPX</para></listitem>
<listitem><para>TCX</para></listitem>
<listitem><para>KML</para></listitem>
<listitem><para>JPG</para></listitem>
</itemizedlist>
</para>
<para>
GPX, TCX, KML and JPG files will be loaded into the existing &appname; view. A <emphasis>Viking</emphasis> file will be given a new window if the current window is already assigned.
</para>
<tip>
<para>
&appname; handles more file types via the <link linkend="acquire">Acquire</link> methods below.
</para>
</tip>
</section>

<section><title>Open Recent File</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Open Recent File</guisubmenu></menuchoice> menu only.
</para>
<para>
The most recently opened files are available for opening again.
The number of files remembered is controlled by a value in the <xref linkend="prefs_advanced"/>.
</para>
<para>
Note that files imported via the Acquire mechanism are not available in this list.
</para>
</section>

<section><title>Save</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Save</guisubmenu></menuchoice> menu and on the toolbar <guibutton>Save</guibutton>.
</para>
<para>
If the current opened file is <emphasis>Viking</emphasis> file, this save will simply update it.
If it is a new file or the file loaded was an external type (i.e. GPX or KML), then this will ask for a <emphasis>new name</emphasis> to save as a <emphasis>Viking</emphasis> file.
</para>
</section>

<section><title>Save As</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Save As</guisubmenu></menuchoice> menu only.
</para>
<para>
This will ask for a <emphasis>new name</emphasis> to save as a <emphasis>Viking</emphasis> file (even it was already a <emphasis>Viking</emphasis> file).
</para>
</section>

<section><title>Append File</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Append File...</guisubmenu></menuchoice> menu only.
</para>
<para>
Selecting a <emphasis>Viking</emphasis> file from this method will join the file contents to the current window (instead of creating a new one).
</para>
<para>
GPX and KML files may also be appended, whereby the file contents are added to the currently selected  <xref linkend="TrackWaypoint"/> or <xref linkend="Aggregate"/> layer. Otherwise they are loaded in the normal file open method when no layer is selected.
</para>
</section>

<section id="open_gpx_external"><title>Open GPX as External Layer</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Open GPX as External Layer...</guisubmenu></menuchoice> menu only.
</para>
<para>
Selecting a GPX file from this method will create an external <xref linkend="TrackWaypoint"/> Layer that loads from the specified file.
The layer is marked as a "no write" external layer, which means any changes made will not be written back to the GPX file.
To enable changes to be written, you can change the layer to a standard external layer in the layer properties dialog.
This is in contrast to importing the data and storing it in the Viking file.
</para>
</section>

<section><title>Properties</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Properties</guisubmenu></menuchoice> menu only.
</para>
<para>
Displays some simple properties about the loaded Viking project file (if any), such as full filename including the path, the filesize and the date/time of the file.
</para>
</section>

<section><title>Export All</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Export All</guisubmenu></menuchoice> menu only.
</para>
<variablelist>
<varlistentry>
<term><guilabel>GPX</guilabel></term>
<term><guilabel>KML</guilabel></term>
<listitem>
  <para>This allows converting every <xref linkend="TrackWaypoint"/> layer from the existing project into files of the type choosen.
You will be prompted for a directory into which a new file for each layer will be saved.
</para>
<para>
The KML option uses <application>GPSBabel</application> and so will not be available if <application>GPSBabel</application> can not be detected.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Single GPX File</guilabel></term>
<listitem>
  <para>This allows exporting all visible <xref linkend="TrackWaypoint"/> layers into a single GPX file.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Note that some data properties are not supported by the target export file type. Such as item visibility or track colours.
</para>
</section>

<section id="acquire" xreflabel="acquire"><title>Acquire</title>

<para>
Available on the <menuchoice><guimenu>File</guimenu><guisubmenu>Acquire</guisubmenu></menuchoice> menu and from the <xref linkend="TrackWaypoint"/> layer menu.
</para>
<para>
If used from the <guimenu>File</guimenu> menu these methods place the results in a new TrackWaypoint layer.
</para>
<para>
If used from the <xref linkend="TrackWaypoint"/> layer menu these methods place the results in that TrackWaypoint layer.
</para>

<section>
<title>From GPS</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>From GPS</guimenuitem></menuchoice>
A way of getting information from GPS Devices using <application>GPSBabel</application> to perform the transfer, typically via serial link connections.
</para>
<para>
Select the GPS Device communication settings and then hit <guibutton>OK</guibutton>.
See the <link linkend="method_b">Getting Started</link> section for more info about the settings.
</para>
<note>
<para>
  Only a limited number of devices are supported this way (e.g. Garmin Etrex Legend devices first available ~2003).
</para>
<para>
  For the majority of current (circa 2010-2020) Garmin handheld devices and many other consumer handheld GPS devices (including SatNav style devices such as the <trademark>Garmin Nuvi 255</trademark>) only support a native file system and write information to a <filename>Current.gpx</filename> file or similar. You will have to browse the file system on the device, opening it directly via <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice>.
</para>
<para>
  For modern (circa 2015 onwards) wearable devices such as Garmin Forerunner, Fitbit, Suuntu etc...,
  often have their own propriety binary (often wireless) protocols - not compatibile with GPSBabel and thus not &appname; directly either.
  You would need to use their programs / apps to export to an open standard (such as GPX) for use with &appname;.
</para>
</note>
</section>

<section>
<title>Import File With GPSBabel</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>Import File With GPSBabel</guimenuitem></menuchoice>
</para>
<para>
Other formats can be imported that are supported by GPSBabel.
</para>
<para>
You need to select the file <emphasis>and</emphasis> the type of the file that is going to be opened,
since there is no automatic detection of the file kind.
</para>
</section>

<section>
<title>OSM Traces</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>OSM Traces</guimenuitem></menuchoice>
</para>
<para>
See <xref linkend="osm_dl"/> section for more information.
</para>
</section>

<section>
<title>My OSM Traces</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>My OSM Traces</guimenuitem></menuchoice>
</para>
<para>
See <xref linkend="osm_my_dl"/> section for more information.
</para>
</section>

<section>
<title>From Geotagged Images</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>From Geotagged Images</guimenuitem></menuchoice>
Enables automatic creation of waypoints from geotagged images.
</para>
<para>
This menu opens a dialog to select such image files.
If the image files have geotag information in them, then a <xref linkend="TrackWaypoint"/> layer with named waypoints positioned at the location of each image with a thumbnail of that image is created.
</para>
</section>

<section>
<title>From Wikipedia Waypoints</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>From Wikipedia Waypoints</guimenuitem></menuchoice>
</para>
<para>
This gets <emphasis>interesting</emphasis> points from Wikipedia for the specified view: either within the extent of layer bounds or within the current viewport boundary.
</para>
</section>

<section>
<title>From Routing</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>From Directions</guimenuitem></menuchoice>
</para>
<para>
This gets a route from given directions.
</para>
</section>

<section>
<title>From URL</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>From URL</guimenuitem></menuchoice>
</para>
<para>
This gets a file from the entered URL.
File formats that can be opened are those supported by GPSBabel.
</para>
<note>
<para>
You need to select the type of the file that is going to be returned, since there is no automatic detection of the file kind.
</para>
</note>
</section>

<section>
<title>Import GeoJSON File</title>
<para>
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>Import GeoJSON File</guimenuitem></menuchoice>
</para>
<para>
This uses the program <ulink url="https://github.com/tyrasd/togpx">togpx</ulink> to load .geojson files.
If the program is not detected on your system, then this option will not be available.
See <ulink url="https://www.npmjs.org/package/togpx">here</ulink> for the installation method.
</para>
<para>
Versions prior to 1.6.0 of GPSBabel did not support the <ulink url="https://geojson.org/">GeoJSON</ulink> file format.
</para>
</section>

</section> <!-- End Acquire -->

<section><title>Print</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Print</guisubmenu></menuchoice> menu and on the toolbar <guibutton>Print</guibutton>.
</para>
<para>
Print uses what is displayed on the current <xref linkend="viewport"/> for printing: i.e. what ever map, tracks and waypoints that are in view, including the
cross hairs and the scale.
</para>
<para>
It uses a standard system print dialog using an image the size of the current viewport in pixel terms.
On the <emphasis>Image Settings</emphasis> you can move the image around the page and scale the image up / or down.
</para>
</section>

<section><title>Generate Image File</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Generate Image File</guisubmenu></menuchoice> menu only.
</para>
<para>
Allows generation of larger (pixel) area images than the standard Print method above.
From the generated image you can use the facilities of the <application>Operating System</application> to print the image
or perform other actions.
</para>
<para>
You should have previously downloaded the tile images for the chosen zoom level,
otherwise the image produced will have missing sections.
</para>
<warning>
<para>
Using large areas takes some time to process and due to the method used it may run out of memory to complete the operation.
Unfortunately under <trademark>Windows</trademark> systems it can not detect this failure and may crash the program.
So the maximum size is dependent on the capabilities of your system.
For instance the largest successful image generated on my (RN) Debian system is a pixel area of 20,000 x 20,000.
</para>
</warning>
</section>

<section><title>Generate Directory of Images</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu><guisubmenu>Generate Directory of Images</guisubmenu></menuchoice> menu only.
</para>
<note>
<para>
This is only available in UTM mode.
</para>
</note>
</section>

<section><title>KMZ Map File Overview</title>
<para>
A <ulink url="https://developers.google.com/kml/documentation/kmzarchives">KMZ file</ulink> is a compressed version of a KML file and associated supporting files.
</para>
<para>
A <ulink url="https://garminbasecamp.wikispaces.com/Custom+Maps">KMZ Map file</ulink> is a KMZ file with an image overlay often for use as a Custom Map on Garmin GPSr devices.
</para>
<para>
&appname; only supports basic properties in KMZ Map files, primarily intended for use with Garmin GPSr devices although KMZ exports are known to work with <application>Google Earth</application>.
</para>
</section>

<section><title>Import KMZ Map File</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu></menuchoice> menu only.
</para>
<para>
Enables loading of a selected KMZ map file.
This generates a new <xref linkend="GeoRef"/> map layer using the overlay image contained within the KMZ file.
</para>
</section>

<section><title>Generate KMZ Map File</title>
<para>
Located on the <menuchoice><guimenu>File</guimenu></menuchoice> menu only.
</para>
<para>
Enables exporting the current <xref linkend="viewport"/> as a KMZ map file.
The area and zoom level covered by the KMZ map can be adjusted before saving.
</para>
<para>
Note that Garmin GPSr devices have limits in using images if they are too large (e.g. over 3Mb big) in KMZ files.
&appname; does not enforce any limits on the KMZ files it generates.
</para>
</section>

<section id="Calendar"><title>Calendar</title>
<para>
The calendar marks days when any activity in Tracks occurred. Hovering the mouse pointer over a marked day shows the name of the corresponding <xref linkend="TrackWaypoint"/> Layer. Double clicking on a marked day moves the <xref linkend="viewport"/> to view the first track of that day.
</para>
<para>
Right clicking on the calendar offers further options to navigate in time, including moving the calendar to the next or previous track by date or to move to todays date.
</para>
</section>

<section id="Goto"><title>Goto</title>
<para>
This offers to search locations using the selected online providers, by default either <ulink url="https://nominatim.org/">OSM Nominatim</ulink> or <ulink url="https://www.geonames.org/">Geonames</ulink>.
One may click on the an entry in the list of returned results to move the <xref linkend="viewport"/> to that location.
</para>
<para>
See the section <xref linkend="search_provider"/> to configure additional search providers.
</para>
<figure>
<title>Screenshot: Goto Tab</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Goto_Main_Window.png"/>
</screenshot>
</figure>
</section>

<section id="PanelStats"><title>Track/Route Statistics</title>
<para>
  This offers a compact view of statistics of the selected Track or Route.
  Currently this does not refresh if the Track/Route changes but there is a right click menu on the tab,
  which offers a way to manually refresh the values.
</para>
<figure>
<title>Screenshot: Stats Tab</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Panel_Stats_Tab.png"/>
</screenshot>
</figure>
<para>
  Also available is a tab to shows <xref linkend="track_time_splits"/>.
  Since this is a more detailed display that is of interest only to a subset of users and takes up more space, the tab is hidden by default.
  Use <menuchoice><guimenu>View</guimenu><guimenuitem>Show</guimenuitem><guimenuitem>Show Side Panel Splits</guimenuitem></menuchoice> to enable it.
  </para>
</section>

</section> <!-- End File Types -->

<xi:include href="edit_view_menus.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

<section id="Layers"><title>Layers</title>

<para>
Layers supported by &appname; are:
</para>
<itemizedlist>
<listitem><para><xref linkend="Aggregate"/></para></listitem>
<listitem><para><xref linkend="TrackWaypoint"/></para></listitem>
<listitem><para><xref linkend="GPS"/></para></listitem>
<listitem><para><xref linkend="DEM"/></para></listitem>
<listitem><para><xref linkend="Coordinate"/></para></listitem>
<listitem><para><xref linkend="Map"/></para></listitem>
<listitem><para><xref linkend="GeoRef"/></para></listitem>
<listitem><para><xref linkend="MapnikRendering"/></para></listitem>
<listitem><para><xref linkend="GeoClue"/></para></listitem>
</itemizedlist>
<para>
For each layer there are a few standard options:
</para>
<itemizedlist>
<listitem><para>Properties - Layer setup / configuration settings dialog:</para>
  <itemizedlist>
    <listitem><para>OK: Applies the new values and closes the dialog</para></listitem>
    <listitem><para>Cancel: Dismiss the changes and closes the dialog</para></listitem>
    <listitem><para>Apply: Applies the new values and keeps the dialog open - thus you can see the effect of the new values.</para></listitem>
    <listitem><para>Reset to Defaults: Change the values back to the Layer Defaults. You will still need to then Apply/OK these changed values to take effect.</para></listitem>
  </itemizedlist>
</listitem>
<listitem><para>Cut</para></listitem>
<listitem><para>Copy</para></listitem>
<listitem><para>Paste</para></listitem>
<listitem><para>Delete</para></listitem>
<listitem><para>Visibility - This checkbox on the Layers Panel controls whether the layer is shown in the viewport or not</para></listitem>
</itemizedlist>
<para>
The cut/copy/paste options can be accessed in a variety of ways once the layer has been selected:
</para>
<itemizedlist>
<listitem><para>Standard keys: <keycap>Ctrl+x|c|v</keycap></para></listitem>
<listitem><para>Main menu <guimenuitem>Edit</guimenuitem></para></listitem>
<listitem><para>From the right click menu</para></listitem>
<listitem><para>Buttons at the bottom of the Layers Panel</para></listitem>
</itemizedlist>
<para>
Default values used for each layer's properties can be altered via the <menuchoice><guimenu>Edit</guimenu><guisubmenu>Layer Defaults</guisubmenu></menuchoice> menu options.
These 'User' Defaults settings themselves can be reset back to the original &appname; default values via the <guibutton>Reset to Default</guibutton> button for each layer.
</para>
<para>
See the individual section for detail about each layer.
</para>
</section>

<section id="TrackWaypoint" xreflabel="TrackWaypoint"><title>TrackWaypoint Layer</title>
<para>
TrackWaypoint layers display GPS data (tracks, routes and waypoints).
</para>
<para>One way to create new waypoints is to copy a
latitude/longitude coordinate pair, such as the one shown on most
geocaches, and paste it into an active TrackWaypoint layer. &appname; can
automatically recognize several variations of the lat/lon format.
</para>
<para>
By right-clicking on tracks, routes or waypoints in the <xref linkend="gc_layers_panel"/>, you can access many commands on them.
You can easily find a specific track, route or waypoint by expanding the appropriate containing Tracks, Routes or Waypoints sublayer in the
layers panel to show all the individual items and then typing the name of the track, route or waypoint.
</para>

<para>
The containing Tracks, Routes or Waypoints sublayers are only shown when items of that type exist.
To start creating them enter into a create mode via either the <guibutton>Create</guibutton> toolbar commands or the <guimenuitem>New</guimenuitem> menu commands.
</para>

<para>
The new TrackWaypoint layer dialog allows the layer to be specified as external.
In this case the layer is exported as GPX to the file specified instead of stored in the Viking file itself.
It is also possible to specify the layer as "no write".
This means that &appname; does not write the layer to the GPX file specified; instead, &appname; only reads the file.
No-write layers are primarily intended to be used with the <xref linkend="open_gpx_external"/> option in the File menu.
</para>

<para>
External layers are loaded only when they are displayed or selected.
Hence, they will not appear in any summary statistics if they have not been loaded.
It is possible to load all external layers contained in an <xref linkend="Aggregate"/> layer by selecting <menuchoice><guimenu>File</guimenu><guisubmenu>Load External Layers</guisubmenu></menuchoice> from the Aggregate Layer context menu.
Note, &appname; specific options may not be saved if not supported by the GPX export.
</para>

<para>
The sublayers also offer right click menu options.
These are the same as those available at the TrackWaypoint level, but only those that relate to the sublayer type.
</para>

<para>
By default routes are coloured red. Tracks are automatically assigned a spread of colours.
</para>

<para>
Most operations available on tracks are available on routes, except for functionality that relies on having timestamps - since routes by definition have no timing information. Thus for example, uploading a route to OpenStreetMap Traces is not available nor is Geotagging on a route.
It is possible to convert between Tracks and Routes, although converting from a Track to a Route may involve a loss of information (hence you are required to confirm this operation before it happens).
</para>

<para>
Also see <xref linkend="trw_tools"/> for use in conjunction with this layer.
</para>

<section><title>Layer Properties</title>
<para>
This layer has many configurable properties split into several parts:
</para>
<section><title>Waypoints</title>
  <para>Options that effect the drawing of waypoints.</para>
</section>
<section><title>Tracks</title>
  <para>Basic options that effect the drawing of tracks and routes.</para>
</section>
<section><title>Tracks Advanced</title>
  <para>More detailed options that effect the drawing and processing of tracks and routes.</para>
  <para>Options that effect the processing of tracks and routes are:</para>
  <variablelist>
    <varlistentry>
      <term><guilabel>Apply DEM Automatically</guilabel></term>
      <listitem><para>Mainly intended for use with External layers, such that elevations values from DEM supercede those in the source file. This needs a DEM layer with a DEM file covering the area of the track for this to take affect.</para></listitem>
    </varlistentry>
    <varlistentry>
      <term><guilabel>Remove Duplicate Trackpoint</guilabel></term>
      <listitem><para>Mainly intended for use with External layers, remove duplicate trackpoints when loading in from the source file.</para></listitem>
    </varlistentry>
    <varlistentry>
      <term><guilabel>Prefer GPS Speed</guilabel></term>
      <listitem><para>Mainly for Maximum speed calculations: use speed from the .</para></listitem>
    </varlistentry>
  </variablelist>
</section>
<section><title>Metadata</title>
  <para>Metadata such as Description, Author and Keywords for this TrackWaypoint Layer.</para>
</section>
<section><title>Filesystem</title>
  <para>Shows the GPX version of the TrackWaypoint Layer and External Layer type information.</para>
</section>
</section><!-- Prop END -->

<section><title>Layer Operations</title>
<para>
The layer has a context menu with several operations.
</para>

<section><title>View Layer</title>
<para>
Version1.1+: This will automatically move the viewport and select the best zoom level to see the whole layer (i.e. all tracks, routes and waypoints).
</para>
</section>

<section><title>View</title>

<section id="track_view_all"><title>View All Tracks</title>
<para>
Version1.1+: This will automatically move the viewport and select the best zoom level to see the all the tracks in the layer (ignoring positions of any routes or waypoints).
</para>
</section>

<section id="route_view_all"><title>View All Routes</title>
<para>
Version1.4+: This will automatically move the viewport and select the best zoom level to see the all the routes in the layer (ignoring positions of any tracks or waypoints).
</para>
</section>

<section id="wp_view_all"><title>View All Waypoints</title>
<para>
Version1.1+: This will automatically move the viewport and select the best zoom level to see the all the waypoints in the layer (ignoring positions of any tracks or routes).
</para>
</section>

</section>

<section><title>Goto Center of Layer</title>
<para>
This will automatically move the viewport to see the whole layer (i.e. tracks, routes and waypoints). It does not adjust the zoom level.
</para>
</section>

<section id="wp_goto"><title>Goto Waypoint</title>
<para>
This opens a dialog box to enter a name of waypoint to search for. If it is found the viewport is centred on it.
</para>
<note>
<para>
Note this search is not very clever and only finds exact matches.
You are probably better off expanding the waypoint list and directly start typing, as mentioned above, which finds a match based on each letter typed.
</para>
</note>
</section>

<section><title>Export Layer</title>
<para>
The layer (all tracks, routes and waypoints) can be exported to following file formats:
</para>
<orderedlist>
	<listitem>
		<para>GPX</para>
	</listitem>
	<listitem>
		<para>GPSPoint</para>
	</listitem>
	<listitem>
		<para>GPSMapper</para>
	</listitem>
	<listitem>
		<para>Google's KML</para>
	</listitem>
	<listitem>
		<para>Any GPSBabel <ulink url="https://www.gpsbabel.org/capabilities.html">File Formats</ulink></para>
		<para>If necessary you can specify any additional format save options as required.</para>
	</listitem>
	<listitem>
		<para>GeoJSON. Via the program <ulink url="https://github.com/mapbox/togeojson">togeojson</ulink></para>
		<para>This option will not be available if the program is not detected on your system.
		See <ulink url="https://www.npmjs.org/package/togeojson">here</ulink> for the installation method.</para>
	</listitem>
</orderedlist>
<para>
Version1.1+: An individual track can be exported to a GPX file via the track menu.
</para>
</section>

<section id="finish_track"><title>Finish Track or Route</title>
<para>
Selecting this option ends the creation of that individual track or route.
</para>
<note>
<para>
This is only available when a track or route is being created by the <xref linkend="track_edit"/> or <xref linkend="route_edit"/> tools.
</para>
</note>
</section>

<section><title>New</title>
<section id="new_wp"><title>New Waypoint</title>
<para>
This opens a dialog (see <xref linkend="WptProps"/>) to create a new waypoint. A default name will be suggested and the default position is the center of the viewport.
</para>
</section>
<section id="new_track"><title>New Track</title>
<para>
This turns on the <xref linkend="track_edit"/> tool.
</para>
</section>
<section id="new_route"><title>New Route</title>
<para>
This turns on the <xref linkend="route_edit"/> tool.
</para>
</section>
</section>

<section><title>Geotag Images</title>
<para>
This starts the Geotagging Images dialog against all tracks in the layer.
See <link linkend="geotagging">Geotagging</link> for further detail.
</para>
</section>

<section><title>Acquire</title>
<para>
This offers the same choice from <xref linkend="acquire"/> methods as on the <guimenu>File</guimenu> menu.
However when invoked from here, the results will be stored in this layer (instead of creating a new one).
</para>
</section>

<section><title>Upload</title>

<section id="gps_upload"><title>Upload to GPS</title>
<para>
This opens a dialog to select the GPS Device and port to which the layer information will be transferred.
</para>
<para>
The types of GPS information (tracks, routes or waypoints) to be transferred can be selected.
</para>
<para>
Tracks, Routes or Waypoints that are invisible will not be transferred.
</para>
</section>

<section id="osm_upload" xreflabel="Upload To OSM" ><title>Upload To OSM</title>
<para>
This opens a dialog to upload all tracks and waypoints to <ulink url="https://openstreetmap.org/">OpenStreetMap</ulink> traces.
Useful if you are an OpenStreetMap contributor, access details are stored in &appname; <xref linkend="prefs_osm"/>
</para>
<para>
 &appname; allows you to edit a track, e.g. remove duplicate points, perhaps remove track points leading to your home and then upload it to OpenStreetMap.
</para>
</section>
</section>

<section><title>Delete</title>
<para>Offers deletion of various parts of a TrackWaypoint layer:</para>
<section id="delete_all_tracks"><title>Delete All Tracks</title>
<para>Deletes all the tracks in this layer.</para>
</section>
<section id="delete_selection_tracks"><title>Delete Tracks from Selection</title>
<para>Opens a dialog with list of all the tracks from this layer to choose the ones to delete.</para>
</section>
<section id="delete_all_routes"><title>Delete All Routes</title>
<para>Deletes all the routes in this layer.</para>
</section>
<section id="delete_selection_routes"><title>Delete Routes from Selection</title>
<para>Opens a dialog with list of all the routes from this layer to choose the ones to delete.</para>
</section>
<section id="delete_all_waypoints"><title>Delete All Waypoints</title>
<para>Deletes all the waypoints in this layer.</para>
</section>
<section id="delete_selection_waypoints"><title>Delete Waypoints from Selection</title>
<para>Opens a dialog with list of all the waypoints from this layer to choose the ones to delete.</para>
</section>
<section id="delete_duplicate_waypoints"><title>Delete Duplicate Waypoints</title>
<para>
  Deletes duplicate waypoints in this layer.
  Waypoints are considered duplicate if they have the same location and symbol.
  <note>
    <para>If other properties are different such as name, comment, altitude, etc... they will still be considered a duplicate.
    </para>
  </note>
</para>
</section>
</section>

<section id="filter" xreflabel="Filter"><title>Filter</title>
<section><title>Simplify All Tracks</title>
<para>
This opens dialog to request the number of points each track will be simplified using <application>GPSBabel</application>. The result is put into a new layer. The simplification method removes points considered to be in a 'near straight line', thus reducing the number of points and attempting to keep the most important turning points.
</para>
</section>
<section><title>Compress Tracks</title>
<para>
Enables compression of tracks and routes via <application>GPSBabel</application>'s <emphasis>Crosstrack</emphasis> simplify method.
It opens a dialog to request the Error factor value which is the maximum allowable error that may be introduced by removing a single point.
It is expressed a distance in units as specified by the <xref linkend="prefs"/> distance option.
Thus a higher value will remove more points.
The result is put into a new layer.
</para>
</section>
<section><title>Remove Duplicate Waypoints</title>
<para>
Remove Duplicate Waypoints - fairly self explanatory, with the results created in a new layer.
</para>
<note>
<para>
However it only considers a precise position (waypoints only 1 metre away from each other are considered different) and also doesn't consider if the waypoints have different comments, symbols or images.
</para>
</note>
</section>
</section>

<section id="filter_with_track"><title>Filter With <emphasis>Trackname</emphasis></title>
<para>
This runs <application>GPSBabel</application> on the layer using information from a previously selected track (select via the track menu "Use With Filter" option) with the following command types:
</para>
<itemizedlist>
<listitem><para>Waypoints Inside This</para></listitem>
<listitem><para>Waypoints Outside This</para></listitem>
</itemizedlist>
<para>
The result is generated in a new Track/Waypoint layer.
</para>
</section>

<section><title>Geotag Images</title>
<para>
This starts the Geotagging Images dialog using the specific track.
See <link linkend="geotagging">Geotagging</link> for further detail.
</para>
</section>

<section><title>List Tracks or Routes</title>
<para>
Opens a new dialog with the list. As described in the Aggregate layer <xref linkend="track_list"/>
</para>
</section>

<section><title>List Waypoints</title>
<para>
Opens a new dialog with the list. As described in the Aggregate layer <xref linkend="waypoint_list"/>
</para>
</section>

</section><!-- End TRW Layer Options -->

<section><title>Track and Route Sublayer Options</title>
<para>Repeats options available at the TrackWaypoint level, but only those for tracks and routes:</para>
<variablelist>
<varlistentry>
<term><guilabel>Finish Track or Route</guilabel></term>
<listitem><para>Same as the layer <link linkend="finish_track">Finish Track or Route</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>New Track or Route</guilabel></term>
<listitem><para>Same as the layer <link linkend="new_track">New Track</link> or <link linkend="new_route">New Route</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>View All Tracks or Routes</guilabel></term>
<listitem><para>Same as the layer <link linkend="track_view_all">View All Tracks</link> or <link linkend="route_view_all">View All Routes</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Delete All Tracks or Routes</guilabel></term>
<listitem><para>Same as the layer <link linkend="delete_all_tracks">Delete All Tracks</link> or <link linkend="delete_all_routes">Delete All Routes</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Delete Tracks or Routes from Selection</guilabel></term>
<listitem><para>Same as the layer <link linkend="delete_selection_tracks">Delete Tracks from Selection</link> or <link linkend="delete_selection_routes">Delete Routes from Selection</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>List Tracks or Routes</guilabel></term>
<listitem><para>Opens a new dialog with the list. As described in the Aggregate layer <xref linkend="track_list"/></para></listitem>
</varlistentry>
</variablelist>
<para>Also gives other options for handling multiple items:</para>
<variablelist>
<varlistentry>
<term><guilabel>Sort</guilabel></term>
<listitem><para>Gives the ability to sort the items in the treeview alphabetically, by date or track/route number.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Visibility</guilabel></term>
<listitem><para>Offers options to quickly control the visibility of all items within the sublayer, as per <xref linkend="vis_options"/></para></listitem>
</varlistentry>
</variablelist>
</section>

<section id='track_properties' xreflabel="Track and Route Properties"><title>Track and Route Properties</title>
<para>
This shows several tabs for properties and useful statistics about a track or a route, including elevation, speed, heart rate, cadence, temperature and power graphs (if the data is available and the graph has not been disabled via <xref linkend="prefs_trackprops"/>).
</para>
<para>
The tabs can be reordered via drag 'n' drop of the tab label. The ordering is retained between new invocations of the properties dialog.
</para>
<para>
Moving the mouse pointer over the graph displays values related to that point along the track.
You can click on these graphs to jump to the point in the track.
You can reverse it, delete duplicates, split at marked position or split a track from its component segments (discontinuous breaks in a track) into separate tracks.
</para>
<para>
For the elevation related graphs the <guibutton>Show DEM</guibutton> check button is only enabled if a suitable <xref linkend="DEM"/> is available that overlaps the track.
</para>
<para>
Graphs either have a <guibutton>Show GPS Speed</guibutton> or <guibutton>Show Speed</guibutton> button.
Each of these overlays relative speed markers along the graph.
The difference between Speed vs GPS Speed is that GPS Speed is taken directly from a field reporting the speed value in the source data.
Typically speeds used in Viking are calculated between the points time and position differences.
This is due to the reporting of speed values in source data is not mandatory and often not present.
</para>
<section xreflabel="Track and Route Properties"><title>Track and Route Properties Tab</title>
<para>
<figure>
<title>Properties Tab: Example (Tabs at side option and reordered)</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Track_properties.png"/>
</screenshot>
</figure>
</para>
</section>
<section id='track_statistics' xreflabel="Track and Route Statistics"><title>Track and Route Statistics Tab</title>
<para>
<figure>
<title>Statistics Tab: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Track_statistics.png"/>
</screenshot>
</figure>
</para>
</section>
<section id='track_elev_graphs' xreflabel="Track Elevation Graph"><title>Track Elevation Graph</title>
<para>
<figure>
<title>Elevation Distance Tab: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Track_elevation_graph.png"/>
</screenshot>
</figure>
</para>
<para>
The following colors are used in the elevation-distance graph:
</para>
<variablelist>
<varlistentry>
<term><emphasis>Main</emphasis> colour - this is dependent on your Desktop theme - often blue by default</term>
<listitem><para>elevation data in graph</para></listitem>
</varlistentry>
<varlistentry>
<term>Yellow</term>
<listitem>
<para>no elevation data</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Green</term>
<listitem>
<para>elevation data from <xref linkend="DEM"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Red</term>
<listitem>
<para>speed</para>
</listitem>
</varlistentry>
</variablelist>
</section>

<section id='track_time_splits' xreflabel="Track Time Splits"><title>Track Time Splits</title>
<para>
<figure>
<title>Splits Tab: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Track_time_splits.png"/>
</screenshot>
</figure>
</para>
<para>
This tab displays timing splits on tracks with timing information.
A few different values of split lengths are available, each having it's own tab display.
</para>
</section>
</section>

<section><title>Track and Route Operations</title>

<section><title>Finish Track</title>
<para>
Selecting this option ends the creation of the individual track.
</para>
<note>
<para>
This is only available when a track is being created by the <xref linkend="track_edit"/> tool.
</para>
</note>
</section>

<section><title>Goto</title>
<para>
This centers the viewport on the selected position on the track:
</para>
<itemizedlist>
<listitem><para>Startpoint</para></listitem>
<listitem><para>"Center" - the notional center from the bounds of the track</para></listitem>
<listitem><para>Endpoint</para></listitem>
<listitem><para>Version1.1+: Highest Altitude</para></listitem>
<listitem><para>Version1.1+: Lowest Altitude</para></listitem>
<listitem><para>Version1.1+: Maximum Speed (Not Available on Routes)</para></listitem>
<listitem><para>Version1.9+: Maximum Heart Rate (Not Available on Routes)</para></listitem>
<listitem><para>Version1.9+: Maximum Cadence (Not Available on Routes)</para></listitem>
<listitem><para>Version1.9+: Maximum Power (Not Available on Routes)</para></listitem>
<listitem><para>Version1.9+: Minimum Temperature (Not Available on Routes)</para></listitem>
<listitem><para>Version1.9+: Maximum Temperature (Not Available on Routes)</para></listitem>
<listitem><para>Version1.8+: Previous trackpoint</para></listitem>
<listitem><para>Version1.8+: Next trackpoint</para></listitem>
</itemizedlist>
</section>

<section><title>View</title>
<para>
Version1.1+: This centers the viewport on the track and selects the best zoom level to see it.
</para>
</section>

<section><title>Combine</title>
<section><title>Merge By Time</title>
<para>
This operation repeatedly tries to merge the right-clicked track
with tracks in the same TrackWaypoint layer. The tracks which are
merged are those which have at least one trackpoint less than some
threshold time away. This way, if you somehow end up with lots of small
segments (say, caused by turning the GPS on and off) you can merge them
easily into one track.
</para>
<note>
<para>
This is not available on routes as they have no timestamps.
</para>
</note>
</section>

<section><title>Merge With Other Tracks</title>
<para>
  This opens a dialog listing the other tracks in the same TrackWaypoint layer, from which one can select the other tracks to merge with.
  Tracks are merged in order of time.
</para>
</section>

<section><title>Merge Segments</title>
<para>
Combines track segments. Effectively removing track segment markers to leave one segment for the whole track.
</para>
</section>

<section><title>Append Track or Route</title>
<para>
Enable joining of a single track to the end of the current track.
This opens a dialog listing the other tracks in the same TrackWaypoint layer from which one can make the selection.
</para>
</section>
</section>

<section><title>Split</title>
<section><title>Split By Time</title>
<para>
This operation will split a single track into segments wherever the
time interval between successive trackpoints is larger than some
threshold. This is useful when processing raw NMEA GPS data, especially
taken over a long time.
</para>
<note>
<para>
This is not available on routes as they have no timestamps.
</para>
</note>
</section>

<section><title>Split By Number of Points</title>
<para>
Version1.2+: This operation will split a single track into segments by the number of points specified.
This can be useful with devices which may have limits on the number of points it supports.
</para>
</section>

<section><title>Split Segments</title>
<para>
Splits track segments into new tracks.
</para>
<note>
<para>
This is not available on routes as they do not have route segments.
</para>
</note>
</section>

<section id='trkpt_split' xreflabel="Split at Trackpoint"><title>Split at Trackpoint</title>
<para>
Splits the track at the currently selected trackpoint.
</para>
<para>
The current track will finish at this trackpoint.
A new track will start from a copy of this trackpoint.
</para>
<note>
<para>
This is only enabled when a trackpoint is selected.
</para>
</note>
</section>

<section><title>Create Segments at Trackpoint</title>
<para>
Creates a new track segment starting at the selected trackpoint.
</para>
<para>
This is not available on routes as route segments are not allowed.
</para>
<para>
This is only enabled when a trackpoint is selected.
</para>
</section>
</section>

<section><title>Insert Points</title>
<note>
<para>
These options are only enabled when a trackpoint is selected.
</para>
</note>
<section><title>Insert Point Before Selected Point</title>
<para>
Inserts a track point halfway between the previous track point and the current track point.
All track point properties are interpolated between the two points.
</para>
</section>
<section><title>Insert Point After Selected Point</title>
<para>
Inserts a track point halfway between the current track point and the next track point.
All track point properties are interpolated between the two points.
</para>
</section>
</section>

<section><title>Delete Points</title>
<section><title>Delete Selected Point</title>
<para>
Deletes the currently selected track point.
</para>
<note>
<para>
This is only enabled when a trackpoint is selected.
</para>
</note>
</section>
<section><title>Delete Points With the Same Position</title>
<para>
Deletes subsequent points that have the same position (but have different timestamps).
</para>
</section>
<section><title>Delete Points With the Same Time</title>
<para>
Deletes subsequent points that have the same time stamp (but may have different positions).
</para>
<note>
<para>
This is not available on routes as they have no timestamps.
</para>
</note>
</section>

</section>

<section id="transform" xreflabel="Transform"><title>Transform</title>
<para>
These options alter the data of trackpoints of a track but not add or remove trackpoints.
And don't seem to fit any other category :)
</para>
<section><title>Apply DEM data</title>
<para>
If any <xref linkend="DEM"/> data is loaded, this will apply the DEM data to give the track elevation data.
Two ways of applying DEM data are offered:
<orderedlist>
<listitem><para>Keep. Retains the existing elevation data of trackpoints and only those missing an elevation value are set.</para></listitem>
<listitem><para>Overwrite. Elevation data are set on all trackpoints even if they already elevation values.</para></listitem>
</orderedlist>
</para>
</section>
<section><title>Smooth Missing Elevation data</title>
<para>
In various locations across the world, there are missing DEM values (AKA DEM Holes) from the SRTM data.
This is particularly noticeable in mountainous areas.
Two ways of applying elevation data to trackpoints that do not have elevation values are offered:
<orderedlist>
<listitem><para>Interpolated. Missing elevation data is interpolated between the previous and next known values.</para></listitem>
<listitem><para>Flat. Elevation data is filled in from the last previously known value.</para></listitem>
</orderedlist>
</para>
</section>
<section>
<title>Convert to Track or Route</title>
<para>
If this is a Route then it will convert it to a Track.
</para>
<para>
If this is Track then convert it to a Route.
</para>
<note>
<para>
Converting from a Track to a Route may involve a loss of information, in particular timestamp values (hence you are required to confirm this operation before it happens).
</para>
</note>
</section>
<section>
<title>Convert to Waypoints</title>
<para>
Each track or route point will be converted into a waypoint.
The original track or route will be removed unless some information in the track would be lost
(e.g. If the track has a comment, this is not copied into every waypoint and the track is kept).
</para>
</section>
<section>
<title>Anonymize Times</title>
<para>
Timestamp information of a track can be shifted to be all offset from 1901-01-01.
</para>
<para>
Thus the timestamps themselves will no longer reveal exactly when a track was taken.
However the relative difference between the timestamps is kept thus one is still able to calculate some properties such as speeds along the track.
</para>
<note>
<para>
This is not available for routes, as they have no timestamps.
</para>
</note>
</section>
<section>
<title>Interpolate Times</title>
<para>
Trackpoint timestamps between the first and last points are calculated such that track is travelled at equal speed.
This is mostly useful when tracks don't have timestamps and you wish to recreate your trip (e.g. you've forgotten to turn on your GPS or the batteries have run out)
Thus edit the first and last trackpoints to set the approximate times of your trip and then use this to give approximate times along the track.
When used on tracks with timestamps this will overwrite the existing timestamps.
</para>
<note>
<para>
This is not available for routes, as they have no timestamps.
</para>
</note>
</section>
<section>
<title>Rotate</title>
<para>
"Rotate" the track or route by shifting the specified number of points from the start to end
(or if a negative number it moves end points to the start).
This is particularly intended for circular routes were you want to adjust where the start/end point is.
If the start and end points are considered to be far apart, you are required to confirm you want to apply this.
If a track has timestamps then rotating the track is not allowed as it would otherwise break trackpoint time ordering.
</para>
</section>
<section>
<title>Rename</title>
<para>
  Rename a track according using the timestamp of the first point in a <ulink url="https://devhints.io/strftime">strftime format</ulink>.
  Use the <guibutton>Preview</guibutton> button to see what the result of applying this format will be.
  The default format is "%d %b %y %H:%M", however after a successful rename the format used is saved for subsequent reuse.
  To restore the default apply a blank format.
</para>
<para>
  This is not available for routes, as they have no timestamps.
</para>
</section>
</section>

<section><title>Export Track as GPX</title>
<para>
Version1.1+: This allows exporting the track as a GPX file by opening a file save dialog.
</para>
</section>

<section><title>Extend Track End</title>
<para>
Changes the current tool to add trackpoints to the end of the track.
</para>
</section>

<section><title>Extend Using Route Finder</title>
<para>
Enables the Route Finder tool. Thus on a subsequent left click in the viewport, a route is calculated from the end of track to that point using the default route service and applied to the track.
</para>
</section>

<section><title>Upload</title>

<section><title>Upload to GPS</title>
<para>
Same as the layer <link linkend="gps_upload">Upload to GPS</link> command, but only applies to the track.
</para>
</section>

<section><title>Upload to OSM</title>
<para>
Same as the layer <link linkend="osm_upload">Upload to OSM</link> command, but only applies to the track.
</para>
</section>

</section>

<section><title>Use With Filter</title>
<para>
This selects the track to be used in the <link linkend="filter_with_track">Filter With <emphasis>Trackname</emphasis></link> feature.
</para>
<note>
<para>
This is not available on routes.
</para>
</note>
</section>

<section><title>Edit Trackpoint</title>
<para>
This opens the Trackpoint edit dialog. See <xref linkend="Trackpoint_edit"/>.
</para>
<note>
<para>
This is only enabled when a trackpoint is selected.
</para>
</note>
</section>

<section><title>Refine Route...</title>
<para>
This function allows one to request a Routing Engine in order to refine a given route.
By "refining" we mean computing all real intermediates points between some given major points.
This could be useful to compute a trip giving only the wished important steps.
</para>
<note>
<para>
This is only available on routes.
</para>
</note>
</section>

<section><title>View Google Directions</title>
<para>
This option is only available on a track created using the Route Finder tool.
</para>
<para>
Launch a web browser to see the Google directions page which yielded the route.
</para>
<note>
<para>
The record of the Google route is stored in the track's comment, so if the comment is changed (or the route was created by something other than the Route Finder tool) this will not work correctly.
</para>
</note>
</section>

</section><!-- End Track Options -->

<section><title>Waypoint Sublayer Options</title>
<para>Repeats options available at the TrackWaypoint level, but only those for waypoints:</para>
<variablelist>
<varlistentry>
<term><guilabel>New Waypoint</guilabel></term>
<listitem><para>Same as the layer <link linkend="new_wp">New Waypoint</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>View All Waypoints</guilabel></term>
<listitem><para>Same as the layer <link linkend="wp_view_all">View All Waypoints</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Goto Waypoint</guilabel></term>
<listitem><para>Same as the layer <link linkend="wp_goto">Goto Waypoint</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Delete All Waypoints</guilabel></term>
<listitem><para>Same as the layer <link linkend="delete_all_waypoints">Delete All Waypoints</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Delete Waypoints from Selection</guilabel></term>
<listitem><para>Same as the layer <link linkend="delete_selection_waypoints">Delete Waypoints from Selection</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Delete Duplicate Waypoints</guilabel></term>
<listitem><para>Same as the layer <link linkend="delete_duplicate_waypoints">Delete Duplicate Waypoints</link></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>List Waypoints</guilabel></term>
<listitem><para>Opens a new dialog with the list. As described in the Aggregate layer <xref linkend="waypoint_list"/></para></listitem>
</varlistentry>
</variablelist>
<para>Also gives other options for handling multiple items:</para>
<variablelist>
<varlistentry>
<term><guilabel>Sort</guilabel></term>
<listitem><para>Gives the ability to sort the items in the treeview alphabetically or by date.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Visibility</guilabel></term>
<listitem><para>Offers options to quickly control the visibility of all items within the sublayer, as per <xref linkend="vis_options"/></para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Transform</guilabel></term>
<listitem>
<para>Options to set the altitude value from <xref linkend="DEM"/> data. Also see track <xref linkend="transform"/>.</para>
<para>An option to set the time from the comment field. First tries ISO8601 formats and then a fallback of a custom format, see "gpx_comment_time_format" in <xref linkend="misc_settings"/>.</para>
<para>An option to convert the (visible) waypoints into a track. The points will be ordered according to the layers Waypoint sort order property. Note that some information such as associated images, symbols, comments etc... are lost in this conversion.</para>
</listitem>
</varlistentry>
</variablelist>
</section>

<section id="WptProps"><title>Waypoint Properties</title>

<para>
This shows a dialog with detailed information for the (possibly new) waypoint. Many properties of the waypoint can set or changed here, such as the comment, the symbol used in drawing or the image (normally a photograph taken at this position) associated with it. When a waypoint has an image, a thumbnail of it is drawn in the viewport for the waypoint (in preference to the symbol).
</para>
<para>
If the waypoint has an associated image, then the Geotag information may be updated, either with updating the file's modification timestamp or not.
This can be useful when the waypoint has been moved.
</para>
<para>
Clicking on the time opens the time edit dialog from which the time can be adjusted (or added if the waypoint did not have a time).
When the waypoint has a time, right clicking on the button opens a menu from which there are options to copy the time value as text or remove the time value.
</para>
<note>
  <para id="LatLonInput" xreflabel="Lat/Lon Pair">
    The latitude entry can accept any text and will attempt to decode the text as a lat/lon pair.
    If successfully decoded then this will take precedence over the longitude value.
    In the case entering e.g. "54.32 -1.098", the latitude will become 54.32 and the longitude -1.098 (when the dialog is accepted).
    This takes a few various lat/lon format strings, including:
    <itemizedlist>
      <listitem><para>"12, 34": Commas are ignored</para></listitem>
      <listitem><para>"S12 W34": With cardinal indicators at begining</para></listitem>
      <listitem><para>"12 S 34 W": With cardinal indicators after (must have space between the number and letter)</para></listitem>
      <listitem><para>"12.34 56.67": DDD format</para></listitem>
      <listitem><para>"S034° 12.3456 W003° 45.6789": DMM format. Equals DDD "-34.20576 -3.76131"</para></listitem>
      <listitem><para>"S034° 12 34 W003° 45 54": DMS format. Equals DDD "-34.20944 -3.76500"</para></listitem>
    </itemizedlist>
  </para>
</note>
<figure>
<title>Waypoint Properties: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/WaypointProperties.png"/>
</screenshot>
</figure>

</section><!-- WP Prop END -->

<section><title>Waypoint Operations</title>

<section><title>Goto</title>
<para>
This centers the viewport on the selected waypoint.
</para>
</section>

<section><title>Geotag Images...</title>
<para>
This opens the <link linkend="geotagging">Geotag Dialog</link> to allow Geotagging multiple images to the position of this waypoint.
In this circumstance creation of waypoint options are disabled and only the options related to writing the EXIF information are available.
</para>
</section>

<section><title>Transform</title>
<para>
Offers a subset of the track <xref linkend="transform"/> utilities.
Setting the altitude from <xref linkend="DEM"/> data and Time from Comment methods are available.
</para>
</section>

<section><title>Visit Webpage</title>
<para>
If the waypoint's comment (or description) starts with <literal>http:</literal> then this option is available and allows launching a web browser to go to the webpage.
</para>
</section>

<section><title>Visit Geocache Webpage</title>
<para>
If the waypoint's name is in Geocache form (GCXXXXX) then this option is available and allows launching a web browser to go to the Geocache page.
</para>
</section>

<section><title>New Waypoint</title>
<para>
Same as the layer <link linkend="new_wp">New Waypoint</link>.
</para>
</section>

</section><!-- WP END -->

<section id="geotagging" xreflabel="Geotagging"><title>Version1.3+: Geotag Images</title>
<para>
This dialog allows geotagging images (normally taken with a digital camera) against a specific waypoint or via interpolation against a specific track or all tracks in the TrackWaypoint layer - depending on how it is invoked.
</para>
<para>
When geotagging against tracks, images need to have an EXIF DATE_TIME_ORIGINAL (nearly always set by a camera). This timestamp is then used to find the location when the image(s) was taken by searching through the track(s) to find the nearest time - interpolating between points if necessary to set the location.
</para>
<note>
<para>
Generally it is good policy to synchronize your camera's clock with your GPS clock before taking photographs. However the times can be adjusted afterwards (if necessary) to take into consideration clock differences.
</para>
</note>
<para>
Various options allow control of how the geotagging process is performed:
</para>
<itemizedlist>
<listitem><para>Images - Add the images used for geotagging</para></listitem>
<listitem><para>Create Waypoints</para></listitem>
<listitem><para>Overwrite Existing Waypoints</para></listitem>
<listitem><para>Write EXIF</para></listitem>
<listitem><para>Overwrite Existing GPS Information</para></listitem>
<listitem><para>Keep File Modification Timestamp</para></listitem>
<listitem><para>Automatic Image Direction - Assumes the direction will be in line with the track heading</para></listitem>
<listitem><para>Interpolate Between Track Segments</para></listitem>
<listitem><para>Image Time Offset - The number of seconds to ADD to the photos time to make it match the GPS data. Calculate this with (GPS - Photo). Can be negative or positive. Useful to adjust times when a camera's timestamp was incorrect.</para></listitem>
<listitem><para>Image Time is Local - Are the timestamps in the image local time or otherwise in UTC.</para></listitem>
<listitem><para>Image Timezone - The timezone adjustment factor.</para></listitem>
</itemizedlist>
<para>
Typically timestamps in images are either in local time or UTC but there is no way of automatically knowing which; so you need to specify which is the case.
<emphasis>Image Time Offset</emphasis> is best used for accounting for camera's clock drift, so normally of the order of a few seconds or minutes.
Whereas <emphasis>Image Timezone</emphasis> is more for adjusting for a camera's timezone difference, or perhaps differences in your current timezone and the timezone the images where taken.
</para>
</section>

</section><!-- TRW Layer END -->

<section id="GPS" xreflabel="GPS"><title>GPS Layer</title>
<para>
The GPS layer is responsible for uploading and downloading GPS data from a GPS device via a serial port connection.
It uses <application>GPSBabel</application> in the background to perform the low level transfer.
Modern GPS devices don't support serial connections any more and typically expose a file system interface and you can simply use the standard File->Open and Export to GPX File methods to transfer data.
</para>
<para>
  This layer is also responsible for realtime GPS tracking using <ulink url="https://gpsd.gitlab.io/gpsd">GPSD</ulink>
</para>
<para>
Expand the GPS layer in the layers panel to see the two <xref linkend="TrackWaypoint"/> layers it
uses for uploading and downloading. To upload, download, or use
realtime tracking, right-click the GPS layer and click the appropriate
menu item.
</para>

<section><title>Download</title>
<para>
To download data from the GPS, right-click the GPS layer and click <guimenuitem>Download from GPS</guimenuitem>.
</para>
</section>

<section><title>Upload</title>
<para>
To upload data to the GPS, first populate the GPS Upload child
layer of the GPS layer (either by creating waypoints/tracks/routes in it, or
copying and pasting or dragging waypoints/tracks/routes from another layer).
Then right-click the GPS layer and click <guimenuitem>Upload to GPS</guimenuitem>.
</para>
</section>

<section><title>Realtime Tracking</title>
<para>
  You must put the correct information to connect to an instance of GPSD in the GPS Layer properties - Realtime Tracking Mode tab.
</para>
<para>
By default &appname; will automatically continually attempt to connect to GPSD using the specified host and port values,
otherwise if necessary use right-click on the layer and select <guimenuitem>Start Realtime Tracking</guimenuitem>.
</para>
<para>
  See <xref linkend="gpsd"/> for more detail.
</para>
</section>

<section><title>Empty <emphasis>Item</emphasis></title>
<para>
There are several options to quickly delete a subsection of data:
</para>
<itemizedlist>
<listitem><para>Empty Realtime</para></listitem>
<listitem><para>Empty Upload</para></listitem>
<listitem><para>Empty Download</para></listitem>
<listitem><para>Empty All</para></listitem>
</itemizedlist>
</section>

</section><!-- End GPS -->


<section id="Map" xreflabel="Map"><title>Map Layer</title>
<para>
This layer provides a single map resource, you may have multiple map layers but only top one (if enabled) will be visible (subject to the <xref linkend="Alpha"/> compositing property).
</para>
<para>
Some maps are continually improving over time (e.g. OpenStreetMap) thus &appname; employs a caching mechanism to avoid redownloading data (see <xref linkend="mapcache"/>).
However a forced refresh for the current view can be made via the <guilabel>Reload All Onscreen Maps</guilabel> option or <keycap>Ctrl+F5</keycap>.
</para>

<para id="cache_location" xreflabel="Cache Root Location">
The default root location for the map cache is searched for in this order (including the legacy locations), using the first existing directory location found to exist. Thus on upgrading &app; it will still continue to use the previous location if it is available.
</para>
<variablelist>
  <varlistentry>
    <term>Environment Override</term>
    <listitem><para><envar>$VIKING_MAPS</envar></para></listitem>
  </varlistentry>
  <varlistentry>
    <term>Global Map Directory</term>
    <listitem>
      <para><trademark>UNIX</trademark>: <filename>/var/cache/maps</filename></para>
      <para><trademark>Windows</trademark>: <filename>C:\VIKING-MAPS</filename></para>
      <para><trademark>Mac</trademark>: <filename>/Library/cache/Viking/maps</filename></para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>Local Map Directory - Legacy - v1.8 and earlier</term>
    <listitem>
      <para><trademark>UNIX</trademark>: <filename>~/.viking-maps</filename></para>
      <para><trademark>Windows</trademark>: <filename>C:\Users\<replaceable>username</replaceable>\VIKING-MAPS</filename></para>
      <para><trademark>Mac</trademark>: <filename>/Library/Application Support/Viking/viking-maps</filename></para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>Local Map Directory - Current - v1.9 onwards</term>
    <listitem>
      <para><trademark>UNIX</trademark>: <filename><envar>$XDG_CACHE_HOME</envar>/viking</filename> - (typically <filename>~/.cache/viking</filename>)</para>
      <para><trademark>Windows</trademark>: <filename>C:\Users\<replaceable>username</replaceable>\AppData\Local\Microsoft\Windows\INetCache\viking</filename></para>
      <para><trademark>Mac</trademark>: <filename>/Library/Caches/viking</filename></para>
    </listitem>
  </varlistentry>
</variablelist>

<para>
You can modify this directory default by setting an explicit value in the <xref linkend="prefs"/> or in <menuchoice><guimenu>Edit</guimenu><guisubmenu>Layer Defaults</guisubmenu></menuchoice> for all new Maps. Or set an explicit Map Directory value for the particular Map Layer in the <xref linkend="map_props"/>.
</para>

<note>
<para>
  If you've upgraded &app; to v1.9 and want it to use the new location, you need to perform these manual steps to ensure consistency in usage:
</para>
<orderedlist>
  <listitem>
    <para>
      Manually move the existing directory (when &app; is not running). e.g. in the command line: <command>mv -p ~/.viking-maps ~/.cache/viking-maps</command>
    </para>
  </listitem>
  <listitem>
    <para>
      Update your <emphasis>.vik files</emphasis> to use the new directory location.
One way would be to manually edit the files with a text editor to change the Map Layer setting from <command>directory=/some/dir/ --> directory=</command> as a blank entry will use the default.
      Otherwise if you open .vik file with &app; the maps may auto download and recreate the previous location, so even if you modify the map directory within &app; and save the .vik file, the next time you open &app; it would notice the old location exists (unless you remove it) and may use that in preference for new Map Layers.
    </para>
  </listitem>
  <listitem>
    <para>
      This location is also used by DEM files, so you need to update your <emphasis>.vik files</emphasis> appropriately use the new directory location of each file used.
  </para>
  </listitem>
  <listitem>
  <para>
    You should also modify any existing explicit Map Directory default in the <xref linkend="prefs"/> and in <menuchoice><guimenu>Edit</guimenu><guisubmenu>Layer Defaults</guisubmenu></menuchoice> (or at least ensure they are blank, in order to use the defaults).
  </para>
  </listitem>
  <listitem>
  <para>
    Finally you will need to fix any other absolute file references in .vik files if you have used files in the map cache location, such as Waypoint Images, Georef Images, External TrackWaypoint Layer references and so forth.
  </para>
  </listitem>
</orderedlist>
</note>

<para>
Also see <xref linkend="map_tool_dl"/> tool for use in conjunction with this layer.
</para>

<formalpara><title>Online Map Tile Providers</title>
<para>
You will need an open internet connection when you are downloading these following map types, but once downloaded they are available from the hard disk cache. When maps are avaliable from the disk cache it is much faster and can be used offline.
Inbuilt maps include various <ulink url="https://openstreetmap.org/">OpenStreetMap (OSM)</ulink> ones and more:
</para>
</formalpara>
<itemizedlist>
<listitem><para>Bing Aerial Maps (&appname; Version1.2+)</para></listitem>
<listitem>
<para><ulink url="https://opentopomap.org/about">OpenTopoMap</ulink> - This is the default (&appname; Version1.9+)</para>
<para>Thank you to the OpenTopoMap team for allowing &appname; to use their tile service as default.</para>
</listitem>
<listitem><para>OpenStreetMap (Mapnik)</para></listitem>
<listitem><para>OpenStreetMap (Cycle)</para></listitem>
<listitem><para>OpenStreetMap (Transport) (&appname; Version1.3+)</para></listitem>
<listitem><para>OpenStreetMap (Humanitarian) (&appname; Version1.5+)</para></listitem>
<listitem><para>NASA BlueMarble</para></listitem>
</itemizedlist>

<para>
&appname; can be configured to handle additional online map resources. See <xref linkend="extend_viking"/> for further detail.
</para>

<formalpara><title>Offline Map Tilesets</title>
<para>
Some map types supported are for on disk tile formats:
</para>
</formalpara>
<itemizedlist>
<listitem>
	<para>On Disk OSM Tile Format</para>
	<para>This is equivalent to any map set with <emphasis>OSM</emphasis> Cache Layput.</para>
</listitem>
<listitem><para><ulink url="https://github.com/mapbox/mbtiles-spec">MBTiles File</ulink></para></listitem>
<listitem>
  <para><ulink url="https://wiki.openstreetmap.org/wiki/Meta_tiles">OSM Metatiles</ulink></para>
  <note>
    <para>This file format is mostly aimed at being rendering cache feature and is <ulink url="https://en.wikipedia.org/wiki/Endianness">Endian</ulink> dependent.</para>
    <para>Thus to successfully view the file cache, the Metatile files and Viking must be of the same endian type (which they probably will be).</para>
  </note>
</listitem>
</itemizedlist>
<para>
Of course you need to have acquired or generated these tilesets yourself.
</para>

<section id="map_props"><title>Map Layer Properties</title>
<para>
Configurable properties:
</para>
<variablelist>
<varlistentry>
<term><guilabel>Map Type</guilabel></term>
<listitem>
	<para>The kind of map this layer displays.</para>
	<note><para>Map types are dependent on the current <xref linkend="projection"/> mode.</para></note>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Maps Directory</guilabel></term>
<listitem><para>Not applicable for MBTiles Map type since it is a single file.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Cache Layout</guilabel></term>
<listitem><para>Viking or OSM. See <xref linkend="mapcache"/>. Only applies to maps from online tile providers.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Map File</guilabel></term>
<listitem><para>Ony applicable for MBTiles Map type since it is a single file.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Alpha</guilabel></term>
<listitem>
	<para>Control the <xref linkend="Alpha"/> value for transparency effects.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Autodownload Maps</guilabel></term>
<listitem><para>This can be useful to turn off when you are not online to avoid pointless download requests or may be keep a map in a 'historical' state.
e.g. perhaps in case a current map rendering is broken.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Autodownload Only Gets Missing Maps</guilabel></term>
<listitem><para>Using this option avoids attempting to update already acquired tiles.
This can be useful if you want to restrict the network usage, without having to resort to manual control. Only applies when <emphasis>Autodownload Maps</emphasis> is on.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Zoom Level</guilabel></term>
<listitem><para>Determines the method of displaying map tiles for the current zoom level.
<emphasis>Viking Zoom Level</emphasis> uses the best matching level, otherwise setting a fixed value will always use map tiles of the specified value regardless of the actual zoom level.</para></listitem>
</varlistentry>
</variablelist>
</section><!-- Map Prop END -->


<section><title>Layer Operations</title>
<section><title>Download Missing Onscreen Maps</title>
<para>
This requests map tiles for areas of the viewport that do not currently have one.
</para>
</section>

<section><title>Download New Onscreen Maps</title>
<para>
This requests map tiles only if the maps are older than the Tile Age preference.
</para>
</section>

<section><title>Reload All Onscreen Maps</title>
<para>
Force a refresh of all visible map tiles.
</para>
</section>

<section><title>Download Maps in Zoom Levels</title>
<para>
This opens a dialog to enable requesting the download of maps for the region in the viewport over a specified number of Tiled Web Map zoom levels.
The download method type can be specified to help limit the number of requests.
</para>
<warning>
<para>
There are some inbuilt limits to prevent downloading large amounts of map tiles.
</para>
<para>
Please respect the usage policy of the tile set provider.
Such as <ulink url="https://operations.osmfoundation.org/policies/tiles/"><citetitle>OSM Tile Usage Policy</citetitle></ulink>.
</para>
</warning>
<para>
<figure>
<title>Maps Download Dialog: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Maps_download_region_dialog.png"/>
</screenshot>
</figure>
</para>
</section>
</section>


</section><!-- End Maps -->

<section id="Aggregate" xreflabel="Aggregate"><title>Aggregate Layer</title>
<para>
This layer is a container layer to hold other layers. There is always an initial and controlling <emphasis>Top Layer</emphasis> that can not be removed but it can be renamed.
</para>
<para>
This layer type is useful for grouping other layers, especially <xref linkend="TrackWaypoint"/> layers, in whatever categories are relevant to you: such as by activity, location or date.
Here are some suggestions:
<itemizedlist>
<listitem><para>Hiking</para></listitem>
<listitem><para>Mountain Biking</para></listitem>
<listitem><para>Road Cycling</para></listitem>
<listitem><para>Car Trips</para></listitem>
<listitem><para>Sailing</para></listitem>
<listitem><para>Holidays</para></listitem>
<listitem><para>UK Points of Interest</para></listitem>
<listitem><para>USA Points of Interest</para></listitem>
<listitem><para>etc...</para></listitem>
</itemizedlist>
</para>
<para>
Thus one can have a list of all your tracks, but groups can be shown or not using the relevant layers visibility checkbox.
</para>

<section><title>Tracks Area Coverage</title>
<para>
Tracks Area Coverage (TAC) is a feature to highlight areas with track coverage.
It is based on OpenStreetMap style tiles - as an approximation to a grid square system.
The size of the area can be changed, which is linked to the OSM Zoom level,
such that a higher Zoom level gives a smaller physical area and so more tiles.
This can be used for general curiousity or perhaps to plan routes to visit areas previously unexplored.
</para>
<para>
The calculations are performed in the background when deemed necessary (e.g. loading in a new file) and can also be manually requested.
</para>
<para>
Note that Viking can be slow in drawing hundreds or more tracks but this analysis is relatively quick and the resulting drawing is much faster.
Thus ATM is it recommended to turn off the visibility of the tracks themselves for this type of usage.
</para>

<para>
<figure>
<title>Tracks Area Coverage: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Viking-TAC.png"/>
</screenshot>
</figure>
</para>

<para>
A concept of ignoring <emphasis>unreachable</emphasis> tiles is supported. This allows marking individual tiles as inaccessible (e.g typically military use only, so no public access) so that the tile is still included for maximum square and clustering count purposes. These tiles are drawn in red on the viewport.
</para>
<para>
On startup &appname; attempts to load the file <filename>unreachable_tiles.txt</filename> in your <xref linkend="config_file_loc"/>.</para>
<para>
The file should contain a list of tiles in the format of 3 numbers, with each line being "OSM_ZOOM TILE_X_ID TILE_Y_ID". e.g.
</para>
<screen>
14 8116 5474
14 8117 5474
</screen>
<para>
Any lines starting with a '#', '!' or ';' are ignored as intended for comments.
A fuller example covering the UK is in <filename>/usr/share/viking/unreachable_tiles.txt</filename> or <filename>C:\Program Files\Viking\data\unreachable_tiles.txt</filename> according to the operating system and typical install locations. You may wish to copy this file into your &appname; home directory so that it is used.
</para>
</section>

<section><title>Heatmap</title>
<para>
The heatmap is another feature to analyse areas with track coverage.
It must be manually requested via right click on the Aggregate layer and choosing from the menu <menuchoice><guimenu>Tracks Heatmap</guimenu><guisubmenu>Calculate</guisubmenu></menuchoice>.
The heatmap covers the current area displayed on the viewport.
</para>
<para>
The calculations are performed in the background as depending on the number of tracks, the heatmap options and the speed of the computer the calculation may take a little time.
If the viewport size is changed then the heatmap is automatically invalidated and removed.
Panning the display leaves the heatmap image only covering the area already calculated.
Zooming in and out scales the heatmap image appropriately, but the image may get removed if the scaling operation is likely to be too slow.
</para>

<para>
<figure>
<title>Heatmap: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Aggregate_heatmap.png"/>
</screenshot>
</figure>
</para>
</section>

<section><title>Layer Properties: Tracks Area Coverage</title>
<para>Offers basic controls whether it is enabled or not and includes the size of the tile.</para>
</section>

<section><title>Layer Properties: TAC Advanced</title>
<para>Controls subsets of TAC drawing are calculated and shown with their colour and opacity.</para>
<para>Note for Max square coverage, ATM it will only draw the first square encountered, although there may be more than one such area.</para>
<para>Note for Cluster coverage, ATM it will only draw the first cluster encountered, although there may be more than one such area.</para>
</section>

<section><title>Layer Properties: Heatmap</title>
<para>Offers controls over the heatmap image.</para>
<para>If there is an existing heatmap on display then changing these values and selecting <guibutton>Apply</guibutton> will cause the heatmap to be recalculated with the new settings.</para>
</section>

<section><title>Layer Operations</title>
<para>
The following are available on Aggregate Layers:
</para>

<section><title>New Layer</title>
<para>
Add a new layer of the selected type.
</para>
</section>

<section><title>Visibility Options</title>
<para>
This offers a quick way to set all the visibilities of each item within the aggregate, rather than having to change each one individually.
<variablelist>
<varlistentry>
<term><guilabel>Show All</guilabel></term>
<listitem><para>Ensures all items are set to be visible.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Hide All</guilabel></term>
<listitem><para>Ensures all items are set to be invisible. This is useful for then turning on single items afterwards so the display is not cluttered.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Toggle</guilabel></term>
<listitem><para>Inverts the visibility status of each item.</para></listitem>
</varlistentry>
</variablelist>
</para>
</section>

<section><title>View - All TrackWaypoint Layers</title>
<para>
Automatically move the viewport and select the best zoom level to see all such <xref linkend="TrackWaypoint"/> layers within this aggregate.
</para>
</section>

<section id="sort_items" xreflabel="Sort"><title>Sort</title>
<para>
The list within the treeview can be sorted.
</para>
<para>
Alphabetical and Date sorts are available.
</para>
<note>
<para>
Generally it is not useful to sort the Top most layer. Sort is mainly intended for Aggregate groups of <xref linkend="TrackWaypoint"/> layers.
</para>
</note>
</section>

<section id="track_list" xreflabel="Track List"><title>Track List</title>
<para>
Selecting this opens a dialog listing all the tracks in a table along side statistics such as track length and maximum speed.
Each column header is clickable and will reorder the list according to that particular column.
You can also rearrange the columns via dragging the column header to the new location.
</para>
<para>
This table may be invoked from a variety of different layer levels and will then list only the relevant tracks (and/or routes).
<variablelist>
<varlistentry>
<term>Aggregate Layer</term>
<listitem><para>Lists Tracks and Routes and the <xref linkend="TrackWaypoint"/> Layer they are in</para></listitem>
</varlistentry>
<varlistentry>
<term>TrackWaypoint Layer</term>
<listitem><para>Lists Tracks and Routes</para></listitem>
</varlistentry>
<varlistentry>
<term>TrackWaypoint Track sublayer</term>
<listitem><para>Lists Tracks only</para></listitem>
</varlistentry>
<varlistentry>
<term>TrackWaypoint Route sublayer</term>
<listitem><para>Lists Routes only</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
<figure>
<title>Track List Dialog: Example</title>
<blockquote>
<para>
This is showing all tracks and routes (although there are no actual routes here!) in multiple <xref linkend="TrackWaypoint"/> layers, that has been sorted by height.
Note that routes will not have timestamps or speeds, but may have elevations and should have some distance!
</para>
</blockquote>
<screenshot>
  <graphic format="PNG" fileref="figures/LayersTracksList.png"/>
</screenshot>
</figure>
</para>
<para>
Hovering the mouse over an entry will show a tooltip of the comment or description if it is available.
</para>
<para>
Each entry in the track list can be selected and on mouse right click offers these options:
<variablelist>
<varlistentry>
<term><guilabel>View</guilabel></term>
<listitem><para>Move the viewport to the area of the item and highlight it.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Statistics</guilabel></term>
<listitem><para>Opens the Properties dialog on the <xref linkend="track_statistics"/> tab. Note this will close the track list dialog.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Copy Data</guilabel></term>
<listitem><para>Copy the data fields as text.</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
If multiple entries are selected the only right click option is <emphasis>Copy Data</emphasis>.
This copies the individual data fields as plain text separated by tab characters, ideal for pasting into other applications in particular spreadsheet programs.
Note that the order of the fields copied is the default column ordering (irrespective to how they may have been rearranged).
</para>
</section>

<section id="waypoint_list" xreflabel="Waypoint List"><title>Waypoint List</title>
<para>
Selecting this opens a dialog listing all the waypoints to give a overview of the waypoint information.
Each column header is clickable and will reorder the list according to that particular column.
You can also rearrange the columns via dragging the column header to the new location.
</para>
<para>
This table may be invoked from a variety of different layer levels and will then list only the relevant waypoints.
<variablelist>
<varlistentry>
<term>Aggregate Layer</term>
<listitem><para>Lists Waypoints and the <xref linkend="TrackWaypoint"/> Layer they are in</para></listitem>
</varlistentry>
<varlistentry>
<term>TrackWaypoint Layer</term>
<listitem><para>Lists Waypoints</para></listitem>
</varlistentry>
<varlistentry>
<term>TrackWaypoint Waypoint sublayer</term>
<listitem><para>Lists Waypoints</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
<figure>
<title>Waypoint List Dialog: Example</title>
<blockquote>
<para>
This was invoked on a <xref linkend="TrackWaypoint"/> layer and shows all waypoints from that single layer. It has been sorted by the symbols.
</para>
</blockquote>
<screenshot>
  <graphic format="PNG" fileref="figures/WaypointsList.png"/>
</screenshot>
</figure>
</para>
<para>
Hovering the mouse over an entry will show a tooltip of the description if it is available.
</para>
<para>
Each entry in the list can be selected and on mouse right click offers these options:
<variablelist>
<varlistentry>
<term><guilabel>View</guilabel></term>
<listitem><para>Move the viewport to the area of the item and highlight it.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Properties</guilabel></term>
<listitem><para>This will open the properties dialog. Note this will close the waypoint list dialog.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Show Picture</guilabel></term>
<listitem><para>If enabled, this will open the associated image in an external Image Viewer program.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Copy Data</guilabel></term>
<listitem><para>Copy the data fields as text.</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
If multiple entries are selected the only right click option is <emphasis>Copy Data</emphasis>.
This copies the individual data fields as plain text separated by tab characters, ideal for pasting into other applications in particular spreadsheet programs.
Note that the order of the fields copied is the default column ordering (irrespective to how they may have been rearranged).
</para>
</section>

<section id="vis_options" xreflabel="Visibility Options"><title>Visibility Options</title>
<para>
This offers a quick way to set all the visibilities of each item within the containing layer, rather than having to change each one individually.
<variablelist>
<varlistentry>
<term><guilabel>Show All</guilabel></term>
<listitem><para>Ensures all items are set to be visible.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Hide All</guilabel></term>
<listitem><para>Ensures all items are set to be invisible. This is useful for then turning on single items afterwards so the display is not cluttered.</para></listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Toggle</guilabel></term>
<listitem><para>Inverts the visibility status of each item.</para></listitem>
</varlistentry>
</variablelist>
</para>
</section>

<section id="search_date" xreflabel="Search by Date"><title>Search by Date</title>
<para>
This opens calendar dialog to select a date to search by within this Aggregate layer.
The first item that is found on that date will be selected.
Tracks are searched first in preference over waypoints.
</para>
</section>

<section id="agg_stats" xreflabel="Statistics"><title>Statistics</title>
<para>
This opens a dialog to display various statistics about all tracks contained within this Aggregate layer.
</para>
<figure>
<title>Statistics Dialog: Totals</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Aggregate_statistics.png"/>
</screenshot>
</figure>
<note>
  <para>
    This currently generates a simplified <ulink url="https://en.wikipedia.org/wiki/Arthur_Eddington#Eddington_number_for_cycling">Eddington number</ulink>.
    In that a per track length value is used, rather than trying to work out a length per day.
    (i.e. doesn't combine multiple tracks for a single day or split very long tracks into days).
    The Eddington number is in the current Unit distance <xref linkend="prefs"/>.
  </para>
</note>
<figure>
<title>Statistics Dialog: Years</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Aggregate_statistics_years.png"/>
</screenshot>
</figure>
<para>
  Each column can be sorted by clicking on the relevant column header.
</para>
<para>
  The right click menu offers an option to copy all the data as text in a CSV style format (using a tabbed separator).
</para>
<para>
  Selecting a year will update the information in the Months tab.
</para>
<figure>
<title>Statistics Dialog: Months</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Aggregate_statistics_months.png"/>
</screenshot>
</figure>
<para>
  Each column can be sorted by clicking on the relevant column header.
</para>
<para>
  The right click menu offers an option to copy all the data as text in a CSV style format (using a tabbed separator).
</para>
<para>
  The right click menu offers an option to show the <xref linkend="track_list"/> for the relevant month.
</para>
</section>

<section><title>File Options</title>
<para>
Offers methods to manage loading and exporting to/from this specific Aggregate layer.
</para>
<variablelist>
<varlistentry>
<term><guilabel>Load External Layers</guilabel></term>
<listitem>
<para>
Using this forces External Layers in this Aggregate Layer to be loaded and so contribute to analysis, as otherwise they are loaded only when they are displayed or selected.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Open GPX as External Layer...</guilabel></term>
<listitem>
<para>This opens a dialog to select files to <xref linkend="open_gpx_external"/> within this Aggregate Layer.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Save Layer As...</guilabel></term>
<listitem>
<para>This opens a dialog to choose a name and location for a new Viking file containing data just this Aggregate Layer.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Append File...</guilabel></term>
<listitem>
<para>This opens a dialog to select files to load within this Aggregate layer.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guilabel>Export As GPX...</guilabel></term>
<listitem>
<para>This opens a dialog choose a name and location for a new GPX file from all visible <xref linkend="TrackWaypoint"/> layers in this Aggregate Layer into a single GPX file.</para>
</listitem>
</varlistentry>
</variablelist>
</section>

<section><title>Tracks Area Coverage->Calculate</title>
<para>
Start a new Tracks Area Coverage calculation.
</para>
</section>

<section><title>Tracks Area Coverage->Remove</title>
<para>
This clears the Tracks Area Coverage information, thus no grid colouring will be displayed.
</para>
</section>

<section><title>Tracks Heatmap->Calculate</title>
<para>
Start a new heatmap calculation for current area displayed on the viewport.
</para>
</section>

<section><title>Tracks Heatmap->Remove</title>
<para>
Clear the heatmap from the display.
</para>
</section>

</section><!-- End Layer Operations -->
</section><!-- End Agg -->

<xi:include href="dem_layer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

<xi:include href="georef_layer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

<xi:include href="geoclue_layer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

<xi:include href="mapnik_rendering_layer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

<section id="Coordinate" xreflabel="Coordinate"><title>Coordinate Layer</title>
<para>
This layer is allows drawing of grid lines on the viewport.
</para>
</section><!-- End Coord -->


<section id="tools" xreflabel="Tools"><title>Tools</title>
<para>
&appname;'s mouse actions on the viewport are controlled by which tool is active. Only one tool can be active at a time. The default mode is <emphasis>Select</emphasis>. You can return to the default mode by pressing <keycap>Escape</keycap>. The default mode can be changed in <xref linkend="misc_settings"/>.
</para>
<para>
You can use the scroll wheel, the middle-click, the middle-click+drag to zoom, center map at position and pan respectively no matter what tool you are using.
</para>
<para>
<keycap>Scroll</keycap>: zoom in and out keeping the mouse over same location
</para>
<para>
<keycap>Ctrl-scroll</keycap>: pan north-south (also <keycap>Ctrl-up</keycap>, <keycap>Ctrl-down</keycap>)
</para>
<para>
<keycap>Shift-scroll</keycap>: pan east-west (also <keycap>Ctrl-left</keycap>, <keycap>Ctrl-right</keycap>)
</para>
<para>
<keycap>Ctrl-shift-scroll</keycap>: zoom in and out, without changing the center (also <keycap>Ctrl+</keycap>, <keycap>Ctrl-</keycap>)
</para>
<para>
<keycap>Middle-click</keycap>: make the clicked point on the map the center
</para>
<para>
<keycap>Middle-click</keycap> and drag: pan
</para>
<para>
Also see <xref linkend="prefs_advanced"/> for options that effect the scrolling behaviour.
</para>
<para>
  When any of the primary window tools is active (Select, Pan, Zoom or Ruler), the viewport can be moved by pressing the arrow keys: <keycap>Up</keycap>, <keycap>Left</keycap>, <keycap>Right</keycap> and <keycap>Down</keycap>.
</para>

<section id="selecttool" xreflabel="Select"><title>Select (Version1.9+)</title>
<para>
This is the default mode of operation for &appname;.
</para>
<para>
This mode can be entered by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/select_18.png"/></guiicon>
</para>
<para>
The select tool allows one to choose an item, discard the selection of an existing item or to move the viewport.
To select an item (waypoint, track or route) left click on it (or reasonably near) in the viewpoint.
ATM to select a track one must actually click on a trackpoint, which is also selected.
To deselect an item simply left click away from any item.
</para>
<para>
To move the viewport hold the left mouse button down whilst moving the mouse pointer around (as per the specific Pan mode).
Also if <keycap>Right Alt</keycap> (or <trademark>Windows</trademark> <keycap>Left Alt</keycap>) is held down then the item selection/deselection is skipped and goes straight into pan mode; this may be useful if the item selection process is noticeably slow (and hence can be bypassed) or avoiding accidental deselection of the item of interest.
</para>
<para>
Once an item (waypoint or trackpoint) is selected it can be moved. The item must be clicked on again in order to start moving the it, this is to prevent accidental movement of item in the initial selection.
If <keycap>Ctrl</keycap> or <keycap>Shift</keycap> is held down at the same time, it will jump the item position to a nearby existing trackpoint or waypoint respectively.
Note that whole tracks cannot be moved.
</para>
<para>
  When a trackpoint is selected pressing <keycap>Left</keycap> or <keycap>Right</keycap> moves to the previous or next trackpoint respectively.
</para>
<para>
  <keycap>[</keycap> or <keycap>Keypad-</keycap> inserts a point before the selected trackpoint, whereas
  <keycap>]</keycap> or <keycap>Keypad+</keycap> inserts a point after the selected trackpoint.
</para>
<para>
  <keycap>Ctrl+d</keycap> will delete the selected trackpoint or waypoint without any additional confirmation of the action. Since there is no undo system - this shortcut is delibrately a two key operation.
</para>
<para>
  Currently these keyboard shortcuts are not configurable.
</para>
<para>
  By default double click zooming is disabled - see <xref linkend="prefs_advanced"/> to enable it.
Double clicking the left mouse button will zoom the map in.
<keycap>Shift</keycap> + double clicking the left mouse button will zoom the map out.
Double clicking the right mouse button will also zoom the map out.
</para>
<para>
This mode can also be entered by the keyboard shortcut <keycap>Ctrl+Shift+C</keycap> or now more simply just <keycap>s</keycap>.
</para>
</section>

<section id="pantool" xreflabel="Pan"><title>Pan</title>
<para>
This mode is entered by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/mover_22.png"/></guiicon>
</para>
<para>
Pan moves the viewpoint. A single click centers the viewport at that point, whereas click and drag dynamically moves the view around.
</para>
<para>
This mode can also be entered by the keyboard shortcut <keycap>Ctrl+Shift+P</keycap> or now more simply just <keycap>p</keycap>.
</para>
<para>
The double click behaviour is the same as in the Select mode described above (i.e. zooms in or out), however it is always enabled.
</para>
</section>

<section id="zoomtool" xreflabel="Zoom"><title>Zoom</title>
<para>
This mode is entered by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/zoom_18.png"/></guiicon>
</para>
<para>
Zooms in and out on the clicked part of the map or by the selected area.
</para>
<para>
This mode can also be entered by the keyboard shortcut <keycap>Ctrl+Shift+Z</keycap> or now more simply just <keycap>z</keycap>.
</para>
<para>
<keycap>Ctrl</keycap> + left or right click: Zoom in/out and center the map on the clicked location
</para>
<para>
<keycap>Shift</keycap> (and hold) + left mouse button: Draws a bounding box area on which to zoom in. The zoom action is performed when the left mouse button is released.
</para>
<para>
<keycap>Shift</keycap> + left click button: Jump Zoom In by up to factor of 3 standard zooms.
</para>
<para>
<keycap>Shift</keycap> + right click button: Jump Zoom Out by up to factor of 3 standard zooms.
</para>
</section>

<section id="rulertool" xreflabel="Ruler"><title>Ruler</title>
<para>
This mode is entered by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/ruler_18.png"/></guiicon>
</para>
<para>
The ruler is used to measure either:
</para>
<itemizedlist>
<listitem>
<para>The bearing and distance between two points: Click on first point and then move the mouse point around - the values will be continually updated.
A second click will <emphasis>freeze</emphasis> the ruler at that point.
</para>
</listitem>
<listitem>
<para>An area: <keycap>Shift</keycap> (and hold) + left mouse button: Draws a bounding box area. Area values are shown in the statusbar and on the viewport.
Releasing the mouse button will <emphasis>freeze</emphasis> the area at that point.
The viewport label option is controlled by <xref linkend="prefs_advanced"/>.
</para>
</listitem>
</itemizedlist>
<para>
This mode can also be entered by the keyboard shortcut <keycap>Ctrl+Shift+U</keycap> or now more simply just <keycap>r</keycap>.
</para>
</section>

<section id="trw_tools"><title>TrackWaypoint Layer Tools</title>
<para>
You must have a <xref linkend="TrackWaypoint"/> Layer selected to use these tools.
</para>
<section id="createwptool" xreflabel="Create Waypoint"><title>Create Waypoint</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/addwp_18.png"/></guiicon>
</para>
<para>
Left click will open the new waypoint dialog (see <xref linkend="WptProps"/>) using the specified position.
</para>
</section>

<section id="track_edit" xreflabel="Edit Track"><title>Create/Edit Track</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/addtr_18.png"/></guiicon>
</para>
<para>
General track edit/create tool.
The first left-click will create a new track and you will be asked to enter a name for the track.
If <keycap>Shift</keycap> is held, a track will be continued from a nearby trackpoint.
Subsequent left-clicks will add new trackpoints.
If <keycap>Shift</keycap> is held, the track will be joined to an existing track at the point selected.
If <keycap>Ctrl</keycap> is held, it will jump the new trackpoint position to a nearby existing trackpoint.
</para>
<para>
Right click or <keycap>Backspace</keycap>: undo one point.
</para>
<para>

</para>
<para>
Double click or <keycap>Escape</keycap>: to finish track creation.
Finishing the track is also available via the right click <xref linkend="TrackWaypoint"/> and track menus.
</para>
<para>
One must finish the current track to be able to create another track.
</para>
</section>

<section id="route_edit" xreflabel="Edit Route"><title>Edit Route</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/vik_new_route_18.png"/></guiicon>
</para>
<para>
This operates in exactly the same way as the <link linkend="track_edit">Edit Track</link> above.
</para>
<para>
One must finish the current route to be able to create another route.
</para>
<para>
One can switch between the <link linkend="route_edit">Edit Route</link> and <link linkend="route_finder">Route Finder</link> tools while editing routes.
</para>
</section>

<section id="route_finder" xreflabel="Route Finder"><title>Create Route Using the Route Finder</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/route_finder_18.png"/></guiicon>
</para>
<para>
Requires an internet connection.
Left click to create a new trackpoint.
If it's the initial trackpoint you will be asked to enter a name for the route, otherwise the default routing engine will be queried to find a route to the new trackpoint.
Right click or <keycap>Backspace</keycap>: remove the last added route.
</para>
<para>
Double click or <keycap>Escape</keycap>: to finish route creation.
Finishing the track is also available via the right click <xref linkend="TrackWaypoint"/> and track menus.
</para>
<para>
One must finish the current route to be able to create another route.
</para>
<para>
One can switch between the <link linkend="route_edit">Edit Route</link> and <link linkend="route_finder">Route Finder</link> tools while editing routes.
</para>
</section>

<section id="splitter" xreflabel="Splitter"><title>Track Splitter</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/splitter_18.png"/></guiicon>
</para>
<para>
Use this tool to split a track or route.
After enabling the tool, click on the track/route point of the track/route at the position where you want the split to occur.
</para>
</section>

<section><title>Edit Waypoint</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/edwp_18.png"/></guiicon>
</para>
<para>
Left Click/drag: select/move a waypoint.
If <keycap>Ctrl</keycap> is held at the same time, it will jump the waypoint position to a nearby existing trackpoint.
If <keycap>Shift</keycap> is held at the same time, it will jump the waypoint position to a nearby existing waypoint.
</para>
<para>Right-click on waypoint: opens a menu with waypoint actions (the
same menu accessed by right-clicking the waypoint in the layers panel)
</para>
</section>

<section><title>Edit Trackpoint</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/edtr_18.png"/></guiicon>
</para>
<para>
Left click near a trackpoint (in screen pixel terms) to bring up the Track Point Edit dialog on that trackpoint.
Whilst the edit dialog is already open, left click again and drag enables moving of the trackpoint.
If <keycap>Ctrl</keycap> is held at the same time, it will jump the new trackpoint position to a nearby existing trackpoint.
</para>
<section id="Trackpoint_edit" xreflabel="Edit Trackpoint Dialog"><title>Edit Trackpoint Dialog</title>
<para>
Editing options in the Trackpoint Edit dialog include:
<itemizedlist>
<listitem><para>Edit the trackpoint name</para></listitem>
<listitem><para>Changing raw lat/long position, altitude and time</para></listitem>
<listitem><para>Forward (go to the next trackpoint)</para></listitem>
<listitem><para>Back (go to the previous trackpoint)</para></listitem>
<listitem><para>Delete</para></listitem>
<listitem><para>Insert. Inserts a point halfway to next trackpoint</para></listitem>
<listitem><para>Split. <xref linkend="trkpt_split"/></para></listitem>
</itemizedlist>
</para>
<para>
Several fields are read only for reference purposes, values are shown if the trackpoint has such information:
<itemizedlist>
<listitem><para>Speed and course.</para></listitem>
<listitem><para>'Between' values: Speed, Time Difference and Distance Difference. When moving between trackpoints (via the Back and Forward buttons) these values are calculated.</para></listitem>
<listitem><para>GPS precision factors.</para></listitem>
</itemizedlist>
</para>
<para>
<figure>
<title>Trackpoint Edit Dialog: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/Trackpoint_edit_dialog.png"/>
</screenshot>
</figure>
One must have been going downhill here to get a reasonable speed by bicycle!
</para>
</section>
</section>

<section><title>Show Picture</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/showpic_18.png"/></guiicon>
</para>
<para>
Opens an image viewer with the picture associated with the waypoint.
By default this uses the default system image viewer.
For Linux you can override this with the setting in the <xref linkend="prefs_external"/>
</para>
</section>

</section>

<section id="georef_tools"><title>Georef Map Layer Tools</title>
<para>
You must have a <xref linkend="GeoRef"/> Map Layer selected to use these tools.
</para>
<section><title>Georef zoom</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/geozoom_18.png"/></guiicon>
</para>
<para>Changes the zoom level of the georeferenced map and changes the
&appname; zoom level accordingly. Useful if you are trying to match GPS
data to a georeferenced map.
</para>
</section>

<section><title>Georef move</title>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/geomove_18.png"/></guiicon>
</para>
<para>
Drag to move the georeferenced map.
</para>
</section>
</section>

<section id="map_tool_dl" xreflabel="Map Download"><title>Map Download</title>
<para>
You must have a <xref linkend="Map"/> Layer selected to use this.
</para>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/mapdl_18.png"/></guiicon>
</para>
<para>
Click to download a single tile. Drag to download tiles in the dragged rectangle area.
</para>
<para>
Right-click to redownload tiles via the selected method. Right-click and drag to redownload tiles in the dragged rectangle area by the selected method.
The possible methods to redownload one or more tiles are:
</para>
<para>
<variablelist>
<varlistentry>
<term>Bad</term>
<listitem><para>Only if the tile is corrupt in some way or missing, then this will download a new copy</para></listitem>
</varlistentry>
<varlistentry>
<term>New</term>
<listitem><para>Refresh the tile according to the local map cache and if server has a newer version</para></listitem>
</varlistentry>
<varlistentry>
<term>All</term>
<listitem><para>Redownload the tile</para></listitem>
</varlistentry>
</variablelist>
</para>
<formalpara><title>Map Tile Information</title>
<para>
By right clicking on viewport and selecting <guimenu>Show Tile Information</guimenu> you can see the tile properties of this location for the current <xref linkend="Map"/> layer and current zoom level.
This includes the remote source URL for the tile and the cached version on the local filesystem with timestamp details.
</para>
</formalpara>
<para>
<figure>
<title>Map Tile Info Dialog: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/map_tile_info_dialog.png"/>
</screenshot>
</figure>
This is using MapQuest at &appname; zoom level 128 over the Isle of Wight, UK.
</para>
</section>

<section id="dem_tool_dl"><title>DEM Download</title>
<para>
You must have a <xref linkend="DEM"/> Layer selected to use this.
</para>
<para>
Enable this tool by clicking on the toolbar icon: <guiicon><inlinegraphic fileref="figures/demdl_18.png"/></guiicon>
</para>
<para>
Click to download and import a DEM file.
</para>
<formalpara><title>DEM File Information</title>
<para>
By right clicking on viewport and selecting <guimenu>Show DEM File Infomation</guimenu> you can see the file properties of the DEM file for this location.
This includes the remote source URL for the file and the cached version on the local filesystem with timestamp details.
</para>
</formalpara>
<para>
<figure>
<title>DEM File Info Dialog: Example</title>
<screenshot>
  <graphic format="PNG" fileref="figures/DEM_file_info_dialog.png"/>
</screenshot>
</figure>
This is for block 51N, 003W - covering Bristol in the UK.
</para>
<note>
  <para>
    The Source URL is generated from the current configuration settings;
    it is not necessarily the URL that was used to acquire the DEM file, as that information is not saved.
  </para>
</note>
</section>

<section><title>Webtools</title>
<para>
Many services are available only via a web browser (Google Maps, OpenStreetMap Potlach editor, etc.).
</para>
<para>
Jumping from &app; to such service can become annoying.
</para>
<para>
&appname; allows you to open such service directly at the position currently viewed in &app;.
</para>
<para>
This feature is called <guilabel>Webtools</guilabel>. It is also known as External Tools.
</para>
</section>

</section>

<!-- Preferences -->
<section id="prefs" xreflabel="Preferences"><title>Preferences</title>
<section><title>General</title>
<section><title>Localisation</title>
<para>You can select units displayed by &appname; to best fit your usage.</para>
<figure>
<title>Properties dialog: units part</title>
<screenshot>
  <graphic format="PNG" fileref="figures/properties_units.png"/>
</screenshot>
</figure>
<para>Concerning degrees, you can select the way to display them:
<variablelist>
<varlistentry>
<term>DDD</term><listitem><para>decimal degree</para></listitem>
</varlistentry>
<varlistentry>
<term>DMM</term><listitem><para>partial sexagesimal display: degrees, minutes and decimal part of minutes</para></listitem>
</varlistentry>
<varlistentry>
<term>DMS</term><listitem><para>sexagesimal display: degrees, minutes and seconds</para></listitem>
</varlistentry>
</variablelist>
</para>
<figure>
<title>Properties dialog: degree display options</title>
<screenshot>
  <graphic format="PNG" fileref="figures/properties_degree.png"/>
</screenshot>
</figure>
</section>
<section><title>Waypoint Icon Size</title>
<para>An option exists to control the icon (symbol) size used for waypoints
</para>
</section>
<section><title><emphasis>Home</emphasis> Default Location: Latitude and Longitude</title>
<para>You can set the <emphasis>Home</emphasis> location directly by inputting the latitude and longitude in decimal degrees.
</para>
</section>
<section><title>Default Zoom Level</title>
<para>An option to set the default <xref linkend="zoom"/>.
</para>
</section>
<section><title>Time Display</title>
<para>This controls the reference timezone that times are shown in.</para>
<para><emphasis>Locale</emphasis> is the current user's system preference. This was how all times were shown up to version 1.5.</para>
<para><emphasis>World</emphasis> will attempt to determine the timezone at an object's position.</para>
<para><emphasis>UTC</emphasis> enforces this standard timezone.</para>
</section>
<section><title>Tile's age</title>
<para>This age is used to decided whether or not a new request to tile server must be done.
</para>
<para>Changing this value, you will increase or decrease the network load.</para>
</section>
<section><title>Default map layer directory</title>
<para>This property sets the default directory of the tiles cache.
This value is used when you create a new <xref linkend="Map"/> layer.
</para>
<para>You are still able to change this value in each map layer properties.</para>
</section>
<section><title>Map Cache Memory Size</title>
<para>This controls the amount of maps that are stored in memory, rather than having to reread from disk.
Generally if you have a system with lots of memory it's recommended to increase this value.
</para>
</section>
</section>

<section id="prefs_external" xreflabel="Export/External Preferences"><title>Export/External</title>
<section><title>KML Export Units</title>
<para>Allows setting the units used when saved as the KML file type, such as Metric or Statue units</para>
</section>
<section><title>KML Export Track</title>
<para>Controls the whether the &lt;Track&gt; tag is used in the KML file. If not on then tracks are only saved as LineStrings.</para>
</section>
<section><title>KML Export Points</title>
<para>Controls the whether placemarks are created for every track or route point.</para>
<tip><para>If more control is required over the export then use <menuchoice><guimenu>Export Layer</guimenu><guisubmenu>Export via GPSBabel</guisubmenu></menuchoice> to manually specify the save options</para></tip>
</section>
<section><title>GPX Track Order</title>
<para>
	Other software may display tracks in a particular order (often the order saved into the file).
	This allows you to control the order they are saved when exporting to a GPX file.
</para>
</section>
<section><title>GPX Waypoint Symbols</title>
<para>Some GPS devices require waypoint symbols to be in a particular case.</para>
<para>E.g. On a Garmin Oregon 450 they must be in <emphasis>Title Case</emphasis> to be recognized.</para>
</section>
<section><title>GPX Creator</title>
<para>If not blank, then this setting overrides the default internal value that is used when writing to a GPX file.</para>
</section>
<section><title>Image Viewer (Not Windows)</title>
<para>Allows setting the program used to view images associated with Waypoints.</para>
<para>By default this is set to <application>xdg-open</application> which should open the system's default image viewer, however this can be overridden with this setting.</para>
<para>Note: for Windows systems, viewing images associated with Waypoints always uses the system's default image viewer.</para>
</section>
<section><title>External GPX programs</title>
<para>Allows setting the programs invoked via the <xref linkend="TrackWaypoint"/> Layer menu <menuchoice><guimenu>Export Layer</guimenu><guisubmenu>Open With 'program'</guisubmenu></menuchoice></para>
<para>Two options are given so that it can be configured for various uses such as:</para>
<itemizedlist>
<listitem><para>An OSM editor (default)</para></listitem>
<listitem><para>Some other user defined program</para></listitem>
</itemizedlist>
</section>
<section><title>GPSBabel</title>
<para>This allows setting the specific location of GPSBabel.</para>
<para>&appname; will need to be restarted for this setting to take effect.</para>
</section>
<section><title>Auto Read World Files</title>
<para>If this is on, when a new image is selected for the GeoRef layer then the associated world file will be read to find the scale and positional properties.</para>
<para>The associated file is based on filename patterns; e.g. if the image is <filename>filename.jpg</filename> - then the world file may be <filename>filename.jpgw</filename> or <filename>filename.jgw</filename></para>
</section>
<section id="gpx_simplify" xreflabel="Auto GPX Simplify"><title>Auto Device GPX Simplify</title>
<para>If this is on, GPX files will be simplified (using <application>GPSBabel</application>) if they are saved into a special location (by default a Garmin device location in OS file system).</para>
<para>Extra parameters used in process such as the location and limits applied can be refined by <emphasis>export_device_*</emphasis> values in <xref linkend="misc_settings"/>.</para>
<para>A warning message is displayed when this occurs so one can consider if manually managing the tracks is needed, e.g. see <xref linkend="filter"/> methods.</para>
<para>The main intention for this is to prevent writing GPX files that are only partially useful.
For instance on a GPS Etrex 20 device: if a track with 1000 points is saved to it, the device will only read in the first 500 points,
thus effectively making only 1/2 of the track available.
Hopefully a simplified track will be more useful to follow to your destination when one is out in the wilds, than only a section of it.
</para>
<note><para>You will need to set the appropriate limits for your device, as this is not currently auto detected.</para></note>
</section>
</section>

<section id="prefs_advanced" xreflabel="Advanced Preferences"><title>Advanced</title>
<section><title>Save File Reference Mode</title>
<para>
	Files referenced within project files can be saved with either absolute or relative paths.
	Using relative paths can be useful when copying the project file and the associated files between different systems.
</para>
</section>
<section><title>Ask for Name before Track Creation</title>
<para>A setting to control whether an automatic name is used when creating a new track or route, or whether you are asked to enter a name.</para>
</section>
<section><title>Show Tooltip during Track Creation</title>
<para>A setting to control whether the tooltip with the cumulative track or route distance is shown when creating tracks and routes.</para>
</section>
<section><title>Show Graph for TrackWaypoint Layer</title>
<para>A setting to control for the selected <xref linkend="TrackWaypoint"/> layer whether a graph should be drawn when there is a singular track or route in the layer.
Otherwise the specific track or route must be selected in order to draw the associated graph.</para>
</section>
<section><title>The number of recent files</title>
<para>
	The number of recent files shown in the <menuchoice><guimenu>File</guimenu><guisubmenu>Open Recent File</guisubmenu></menuchoice> menu.
	A value of -1 means all files. The new value applies to New Windows only (or on application restart).
</para>
<section><title>Open files in selected layer</title>
<para>A setting to control whether non Viking format files (i.e. typically GPX or KML files) will open in the selected <xref linkend="TrackWaypoint"/> Layer.
When no TrackWaypoint Layer is selected (or the layer is invisibile) then the file will be open in the default manner: at the top level.
</para>
</section>
<section><title>Show calendar day names</title>
<para>A setting to control whether the calendar displays day names (Mon, Tue, etc...) or not.
</para>
</section>
<section><title>Ruler area label position</title>
<para>A setting to control the position of the label drawn on the viewport that shows the area value. Includes a setting to turn off the label.
</para>
</section>
<section><title>Use Scroll to Zoom</title>
<para>A setting to control if scroll events cause the viewport to zoom (rather than moving). Useful with mouse scroll wheels, but less intuitive for touchpads.
</para>
<note>
<para>GTK3 Build: Viking now detects the device emitting scroll events, so from trackpads/touchscreens these will always scroll the viewport. This setting is only now used for mouse scroll wheels.
</para>
</note>
</section>
<section><title>Invert Scroll Direction</title>
<para>A setting to control the direction of scroll events. Especially useful with touchpads and can be used to override the desktop system's setting.
</para>
</section>
<section><title>Select Tool Double Click to Zoom</title>
<para>A setting to enable the Select Tool double click behaviour as per the previous default tool (Pan Tool) behaviour. By default this is off, as typically one would use the scroll wheel to zoom. When off this means Viking does not need to wait to see if double clicks are going to occur and so can take immediate action (e.g. show a context menu without delay). Turning this on my be useful for touchpads (however the intention is to support Pinch Zoom behaviour) or perhaps if your scroll wheel is broken.
</para>
</section>
<section><title>Auto Select Trackpoint</title>
<para>A setting to control whether when moving the mouse over the track graph on the main display, it updates the selected trackpoint in the viewport.
</para>
<section><title>Warn Unsaved Changes on Exit</title>
  <para>If you don't want &appname; to warn about unsaved changes on exit then you can turn this off.</para>
</section>
<section><title>Select Newly Created Layer</title>
  <para>A setting to control when a new layer is created that it is selected; otherwise the current selection is unchanged.</para>
</section>
</section>
</section>
</section>

<section id="prefs_osm" xreflabel="OpenStreetMap Traces Preferences"><title>OpenStreetMap Traces</title>
<section><title>OAuth Method</title>
<para>
  Using the <ulink url="https://en.wikipedia.org/wiki/OAuth">OAuth</ulink> method means that your OSM account details are no longer needed to be known by &appname;.
  Instead specific tokens are generated for use only by &appname; which are associated with your OSM account.
</para>
<para><emphasis role="bold"><guibutton>Get New OSM Access Tokens</guibutton></emphasis>
  Use this button to generate a new OSM Access Token Key and Secret.
  You will be redirected to the OSM website to confirm allowing &appname; to access the GPX Traces features.
  The tokens returned by the OSM website will be stored in the Access Token Key + Access Token Secret preferences.
</para>
<para><emphasis role="bold">Access Token Key + Access Token Secret</emphasis>:
These are the values used, however one typically does not need to manually change them.</para>
</section>
<section><title>HTTP Basic Authentication (Discouraged)</title>
<para><emphasis role="bold">OSM Username + Password</emphasis></para>
<para>Store your OSM details here, so that you don't need to enter it in every time in the <xref linkend="osm_upload"/> procedure.</para>
<para>This is not recommended and one should use the <ulink url="https://en.wikipedia.org/wiki/OAuth">OAuth</ulink> method using access tokens described above.</para>
<warning>
<para>
Your OSM password will be stored in plain text.
</para>
</warning>
<warning>
<para>
This password is transferred <emphasis role="bold">unencrypted</emphasis> in every request sent to the OpenStreetMap server. This is due to the use of OpenStreetMap's basic authentication method.
</para>
</warning>
<warning>
<para>
When OAuth capability is built into &appname; (the default), use of HTTP Basic Authentication can only be used if the <xref linkend="misc_settings"/> <emphasis>osm_basic_auth</emphasis> is enabled.
</para>
</warning>
</section>
</section>

<section id="prefs_mapnik" xreflabel="Mapnik Preferences"><title>Mapnik</title>
<note>
<para>If any changes to these settings are made, you will need to restart &appname; to make them be applied.
</para>
</note>
<section><title>Plugins Directory</title>
<para>The location of Mapnik plugins. An attempt is made to automatically determine the initial value,
 however if this is wrong or Mapnik is upgraded then the directory can be set here.</para>
</section>
<section><title>Fonts Directory</title>
<para>
The location of fonts for use with Mapnik. Normally it is best to simply use the System's font directory.
</para>
</section>
<section><title>Recurse Fonts Directory</title>
<para>Load fonts in any sub-directories of the main font directory.</para>
</section>
<section><title>Rerender Timeout</title>
<para>The time in hours before any tile is rerendered.</para>
<para>This is useful in case the underlying source data for the tiles changes (e.g. OSM data is continually evolving).
 &appname; normally has no way of knowing when the data has changed, so this simple timeout method is provided to maintain consistency of the tile images.</para>
</section>
<section><title>CartoCSS</title>
<para>This allows setting the specific location of the <emphasis>carto</emphasis> executable.</para>
</section>
<section><title>Threads</title>
<para>
	The number of threads to use for Mapnik rendering tasks.
	By default the value is set to the 1 in case of any multi-threading rendering code chain crashes.
	Otherwise trying setting the value to the number of the CPUs of the system minus one (so as not to overload the system), in order to minimise the overall rendering times.
</para>
</section>
</section>

<section id="prefs_routing" xreflabel="Routing Preferences"><title>Routing</title>
<section><title>Routing engine</title>
<para>You can select the routing engine used by default, ie by features that do not propose a live selection, like <xref linkend="route_finder"/>.</para>
</section>
</section>

<section id="prefs_startup" xreflabel="Startup Preferences"><title>Startup</title>
<para>Naturally since these preferences effect the startup, the values will not be used until &appname; is restarted.</para>
<section><title>Restore Window Setup</title>
<para>When this is enabled, the main window size and layout (such as whether the statusbar or layers panel are shown) is restored to the values from last use.</para>
</section>
<section><title>Default Map Layer</title>
<para>When this is enabled, a map layer is automatically added whenever &appname; is opened and a &appname; file is not to be loaded.</para>
<para>The <xref linkend="Map"/> layer used is defined by the map layer's default values.</para>
</section>
<section><title>Highlight Colour</title>
  <para>Sets the initial colour used for selected items, as used by
    <menuchoice><guimenu>View</guimenu><guimenuitem>Set Highlight Color</guimenuitem></menuchoice>.
  </para>
</section>
<section><title>Startup Method</title>
<para>Enables selection of how the startup position should be determined.</para>
<variablelist>
<varlistentry>
<term>Home Location (default)</term>
<listitem><para>Position as set by the <guilabel>Set the Default Location</guilabel></para></listitem>
</varlistentry>
<varlistentry>
<term>Last Location</term>
<listitem><para>Uses the last position viewed on the viewport</para></listitem>
</varlistentry>
<varlistentry>
<term>Specified File</term>
<listitem><para>Load the file as specified below</para></listitem>
</varlistentry>
<varlistentry>
<term>Auto Location</term>
<listitem>
	<para>Uses the <ulink url="https://www.freedesktop.org/wiki/Software/GeoClue">GeoClue</ulink> service if available
	or otherwise the web service <ulink url="https://www.hostip.info">hostip.info</ulink> to attempt to determine your location via IP lookup
	</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section><title>Startup File</title>
<para>Loads this specified file when the Startup method is set to <guilabel>Specified File</guilabel></para>
</section>
<section><title>Check For New Version</title>
<para>Periodically (no more than once every 14 days), check to see if there is a new version of &appname; available.</para>
</section>
</section>

<section id="prefs_dem_server" xreflabel="DEM Server"><title>DEM Server</title>
<para>Store your NASA Earth login details which uses HTTP Basic Authentication.</para>
<warning>
<para>
Your password will be stored in plain text.
</para>
</warning>
</section>

<section id="prefs_toolbar" xreflabel="Toolbar Preferences"><title>Toolbar</title>
<section><title>Append to Menu</title>
<para>Allows setting the toolbar on the same vertical space as the menu, thus increasing vertical space for the map.</para>
</section>
<section><title>Icon Size</title>
<para>Allows configuration of the icon size, including overiding the system's default preference to the setting desired just for &appname;.</para>
</section>
<section><title>Icon Style</title>
<para>Allows configuration of the icon style, including overiding the system's default preference to the setting desired just for &appname;.</para>
</section>
<section id="prefs_toolbar_customize" xreflabel="Customize Toolbar"><title>Customize</title>
<para>Opens the Customize Toolbar dialog.</para>
<para>From this dialog the items in the toolbar can be added, removed and reordered. Reordering of items is performed by drag and drop.</para>
<figure>
<title>Customize Toolbar dialog</title>
<screenshot>
  <graphic format="PNG" fileref="figures/customize_toolbar_dialog.png"/>
</screenshot>
</figure>
</section>
</section>

<section id="prefs_trackprops" xreflabel="Track Properties Dialog Preferences"><title>Track Properties Dialog</title>
<section><title>Track Properties Dialog</title>
<para>A setting to control the location of the tabs (either to the side or on top).</para>
<para>Settings to control displaying any of the individual graph types.</para>
</section>
</section>

</section>

<!-- HOWTOS-->
<section id="Howto"><title>Howto's</title>
<section id="howto_start"><title>Getting Started</title>
<para>
&appname; from version 1.5 has several features to ease the start up process.
On the very first run, you will be asked if you want to enable these features which make use of an Internet connection.
If you select no or you have upgraded from an earlier version you can choose to enable any of the startup options via the <xref linkend="prefs_startup"/>.
</para>
<para>
Some other general use cases for using &appname;, are as follows:
</para>
<section><title>Go to an Area of Interest - Simple Ways</title>
<para>
&appname;'s default location is a Manhattan, New York, USA, so you may need to pick another place that interests you - such as where you live.
</para>

<procedure>
<title>Method A</title>
<step>
<para>
  The No Effort Approach
</para>
<para>
  If you have accepted &appname;'s defaults then it will attempt to automatically find your location via IP lookup methods.
</para>
<note>
  <para>You will need an internet connection for this to work!</para>
</note>
</step>
</procedure>

<procedure>
<title>Method B</title>
<step>
<para>
  Use the online location address/place search.
</para>
<para>
  Use the <guibutton>Go to Location</guibutton> toolbar button or from the menus
  <menuchoice><guimenu>View</guimenu><guimenuitem>Go to Location</guimenuitem></menuchoice>
  or from the Goto tab on the left hand panel.
  You can change the search location provider if desired.
  Enter the name of place you wish to go to (you may need to specify the country to refine the search).
  Also you can enter a post code or a ZIP code instead.
</para>
<note>
	<para>You will need an internet connection for this search to work</para>
</note>
</step>
</procedure>

<procedure>
<title>Method C</title>
<step>
<para>
Get data from files in GPX, TCX or KML format, which can be opened directly.
Use <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice>
This could be directly from a GPS device if supports a file system / mass storage mode.
</para>
<para>
  The file location for a GPS device is device and Operating System dependent.
  Assuming the device automounts (most Operating Systems/Desktop Enviroment do this automatically).
  For example with an Etrex 20, using (this is for Debian/Ubuntu) - use <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice> to browse to:
</para>
<para>
  <filename>/media/username/GARMIN/Garmin/GPS/Current/Current.gpx</filename>
</para>
<para>
  For Windows it is typically something like:
  <filename>E:\GARMIN\Garmin\GPX\Current\Current.gpx</filename>
</para>
<para>
Other file formats can be imported that are those supported by GPSBabel.
<menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>Import File With GPSBabel...</guimenuitem></menuchoice>
</para>
<note>
<para>
The viewport will be automatically moved and resized to view the contents of the file.
</para>
</note>
</step>
</procedure>
</section>

<section><title>Go to an Area of Interest - More Advanced Ways</title>
<procedure>
<title>Method A</title>
<step>
<para>
	If you know the coordinates of where you want to view:
</para>
<para>
Use <menuchoice><guimenu>View</guimenu></menuchoice> and select from either <menuchoice><guimenu>Go to Lat/Lon</guimenu></menuchoice> or <menuchoice><guimenu>Go to UTM</guimenu></menuchoice> and then enter in the specific coordinates.
</para>
</step>
</procedure>

<procedure>
<title id="method_b">Method B</title>
<step>
<para>Use the GPS Layer or <menuchoice><guimenu>File</guimenu><guimenuitem>Acquire</guimenuitem><guimenuitem>From GPS</guimenuitem></menuchoice>
to load data directly from a limited set of GPS Devices that are supported by <application>GPSBabel</application>.
</para>
<para>You can specify the types of data to acquire: Tracks, Routes and/or Waypoints.
</para>
<note>
<para>You must have write permission to the port used. For <trademark>Unix</trademark> like OS:</para>
<itemizedlist>
	<listitem><para>/dev/ttyS0 is the first serial port</para></listitem>
	<listitem><para>/dev/ttyUSB0 is the first USB port</para></listitem>
	<listitem><para>usb: is any USB port</para></listitem>
</itemizedlist>
<para>Depending on your distribution only one of the USB port types may work</para>
<para>For <trademark>Windows</trademark>:</para>
<itemizedlist>
	<listitem><para>com1: is the first serial port</para></listitem>
	<listitem><para>usb: is any USB port</para></listitem>
</itemizedlist>
</note>
<note>
  <para>Garmin and Magellan GPS devices supported by all versions of GPSBabel, later versions support more devices such as NaviGPS (Navilink protocol).</para>
  <para>See <ulink url="https://www.gpsbabel.org/capabilities.html">GPSBabel Capabilities</ulink> which includes the devices supported.</para>
</note>
</step>
</procedure>

<procedure>
<title>Method C</title>
<step>
<para>
  Use a GPS's real time location:
</para>
<para>
  See <xref linkend="gpsd"/> for more information.
</para>
</step>
</procedure>
</section>

<section><title>Add a Map Layer</title>
<para>
  By default &appname; will add a map layer for you that will automatically download map tile images, but you can of course change it or add additional map layers.
</para>
<para>
Use <menuchoice><guimenu>Layers</guimenu><guimenuitem>New Map Layer</guimenuitem></menuchoice>, and choose a suitable cache directory
where you would like to store your tracks and click <guilabel>OK</guilabel>. Zoom to a
comfortable level (I suggest 4 mpp) by clicking the left and right
mouse buttons on the gray area where your tracks are. Now from the menu
choose the <xref linkend="map_tool_dl"/> Tool. Click where you would like to download a
map. Regardless of what tool you are using, the middle mouse button
always pans. </para>
<note>
<para>
You need an open internet connection when you are downloading maps.
</para>
</note>
<para>
If you can no longer see your tracks or waypoints and only the map,
it is because the layer named <emphasis>Map</emphasis> is <emphasis>ABOVE</emphasis> your TrackWaypoint layer that your GPS data is in.
This means that it will be drawn last and on top of the other <xref linkend="gc_layers"/>.
Look at the  <xref linkend="gc_layers_panel"/> to the left which shows this order.
Select the <xref linkend="Map"/> layer from the list and click the down arrow button beneath the list until the Map layer is below the <xref linkend="TrackWaypoint"/> layer.
Your tracks will now be drawn over the map.
</para>
</section>

<section id="GoHome" xreflabel="Home Location"><title>Set Your Home Location</title>
<para>
	You can save the current center position of the viewport as the default location AKA the Home Location by
	<menuchoice><guimenu>Edit</guimenu><guimenuitem>Set the Default Location</guimenuitem></menuchoice>.
</para>
<para>
	Then at any time you can return to this place by clicking on the <guibutton>Home</guibutton> icon on the toolbar.
</para>
<para>
    You can also set the default location via specifying the exact latitude and longitude in the <xref linkend="prefs"/>.
</para>
</section>

</section>
<section><title>From 1st startup to GPS track (including offline maps)</title>
<para>
The first you'll see is an empty map, because &appname; in its default configuration will download maps only on demand.
Before fetching unneeded data, one can position to a location of interest, e.g. Stuttgart: <menuchoice><guimenu>View</guimenu><guimenuitem>Go to Location</guimenuitem></menuchoice>, enter <userinput>Stuttgart</userinput>.
</para>
<section><title>Fetching the maps</title>
<para>
<emphasis role="bold">Map</emphasis>
</para>
<procedure>
<step><para><menuchoice><guimenu>Layers</guimenu><guimenuitem>New Map Layer</guimenuitem></menuchoice></para></step>
<step><para>in the layer properties dialogue choose e.g. <guilabel>OpenStreetMap (Mapnik)</guilabel>.</para></step>
<step>
<para>For the moment, we keep the default <guilabel>Maps Directory</guilabel> (the directory in
which the maps will be stored and can be used for offline usage).</para>
</step>
<step>
<para>Check <guilabel>Autodownload maps</guilabel> and keep the zoom level as <guilabel>Use Viking
Zoom Level</guilabel>.</para>
<note>
<para>
however, that these settings will play an important
role in the pre-fetch for offline usage discussed later
</para>
</note>
</step>
</procedure>
<para>You'll see a map of Stuttgart. Using the mouse wheel, you can
zoom in and out. The maps for the choosen resolution will be downloaded
automatically.
</para>
<para>
<emphasis role="bold">DEM Layer (Height Map)</emphasis>
</para>
<procedure>
<step><para>Zoom out to 512.</para></step>
<step><para><menuchoice><guimenu>Layers</guimenu><guimenuitem>New DEM Layer</guimenuitem></menuchoice></para></step>
<step><para>Keep the download source as is (SRTM Global 90m), hit <guilabel>OK</guilabel>.</para></step>
</procedure>

<para>In the layer listing on the left, the <xref linkend="DEM"/> layer should reside
above the <xref linkend="Map"/> layer. If this is not the case, highlight the DEM layer
an shift it one up (using the arrow up button).
</para>
<procedure>
<step><para>highlight the DEM layer in the layer listing on the left</para></step>
<step><para>in the toolbar, check DEM layer download/import (the last symbol)</para></step>
<step><para>a left-click in the map window should then fetch the DEM data</para></step>
</procedure>
<para>
This might take some time.
</para>
<para>
Sometimes, a tile does not show up correctly (you might see only a
black frame in the map window) because it got corrupted during
transfer. In order to correct this, you can delete the corresponding
datafile in the cache. <programlisting> right-click the DEM layer properties</programlisting>
</para>
<para>
The <guilabel>DEM Files</guilabel> listing allows you to delete the specific tiles (alternatively do this from the command line).
</para>
<para>
You can also alter the Min. and Max. elevation in this dialogue.
</para>

</section>
<section><title>GPS Track with Height Profile</title>
<procedure>
<step><para>Uncheck the <xref linkend="DEM"/> layer (the map is shown again)</para></step>
<step>
	<para><menuchoice><guimenu>Layers</guimenu><guimenuitem>New TrackWaypoint Layer</guimenuitem></menuchoice></para>
	<para>Ensure the new track layer is above the <xref linkend="Map"/> layer.</para>
</step>
<step><para>Expand the <xref linkend="TrackWaypoint"/> layer, select <guimenuitem>Tracks</guimenuitem></para></step>
<step><para>In the tools menu choose <guiicon><inlinegraphic fileref="figures/addtr_18.png"/></guiicon> <guibutton>Create Track</guibutton>
</para></step>
<step><para>Leftclick in the map window, enter a name</para></step>
<step>
	<para>Click several times to generate a track (a right-click removes the last point).</para>
	<para>Height data is set automatically since DEM data is available</para>
</step>
<step><para>Expand tracks in the layer menu, your track should show up, select it</para></step>
<step><para>Right click your track, select <guimenuitem>Properties</guimenuitem></para></step>
<step><para>Click the tab <guilabel>Elevation-distance</guilabel> - enjoy the plot</para></step>
</procedure>
<para>
In order to save this setting for later usage
</para>
<procedure>
<step><para>click <guilabel>OK</guilabel> in the <guilabel>Track Properties</guilabel> dialog</para></step>
<step><para><menuchoice><guimenu>File</guimenu><guimenuitem>Save As</guimenuitem></menuchoice>, choose a name (you can open this <emphasis>view</emphasis> later via <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice>).</para></step>
</procedure>

</section>
<section><title>Usecase: offline data for holiday</title>
<para>
Suppose you want to have the <xref linkend="Map"/> and <xref linkend="DEM"/> data offline for your holiday in Italy near Bologna.
</para>
<procedure>
<step><para>Start a new &appname; session.</para></step>
<step><para><menuchoice><guimenu>View</guimenu><guimenuitem>Go to Location</guimenuitem></menuchoice>, enter Bologna</para></step>
<step><para><menuchoice><guimenu>Layers</guimenu><guimenuitem>New Map Layer</guimenuitem></menuchoice></para></step>
<step><para>Choose e.g. <guilabel>OpenStreetMap (mapnik)</guilabel>.</para></step>
<step><para>adapt the <guilabel>maps directory</guilabel> e.g. to <filename>/home/user/.viking-map-holiday/</filename>.
This allows you to delete the map stuff after holiday without purging the rest of your maps.
</para></step>
<step><para>check <guilabel>autodownload map</guilabel></para></step>
<step><para>keep <guilabel>viking zoom level</guilabel></para></step>
<step><para>zoom out to 1024</para></step>
<step><para>add a <xref linkend="DEM"/> layer (as discussed above)</para></step>
<step><para>download the DEM data</para></step>
</procedure>
<para>In the &app; version discussed here, the DEM data automatically
are stored in <filename>/home/user/.viking-maps/</filename>. You can move the corresponding
tiles into <filename>.viking-map-holiday/</filename> if you like.
</para>
<para>
<emphasis role="bold">Download map data for all zoom levels</emphasis>
</para>
<procedure>
<step><para>uncheck the DEM layer for the map to show up</para></step>
<step><para>navigate the map to be centered at Bologna</para></step>
<step><para>choose the zoom such, that all regions of interest are displayed in the map window (e.g. 1024)</para></step>
<step>
<para>follow this sequence until you have all tiles for all zoom levels you need</para>
<substeps>
<step><para>right-click the <xref linkend="Map"/> layer properties</para></step>
<step><para>set the zoomlevel explicitly one below the last (in the first cycle 512), hit OK</para></step>
<step><para>right click the map layer <guimenuitem>Download Missing Onscreen Maps</guimenuitem></para></step>
<step><para>wait until all tiles for that resolution have been downloaded</para></step>
</substeps>
</step>
</procedure>
<para>This may take some time and some hard disk capacity.</para>
<para>
Do not forget to save your configuration (as discussed above).
</para>

</section>

</section>
<section><title>OpenStreetMap project</title>
<para>
<ulink url="https://openstreetmap.org/">OpenStreetMap (OSM)</ulink> is a collaborative project to create a free editable map of the world.
One of the sources of data for this project is GPS tracks.
&appname; supports this project via the GPS Traces methods, both uploading and downloading such data.
</para>
<para>
  Authentication/authorization is required to use these services. See <xref linkend="prefs_osm"/>.
</para>
<para>
Also see <ulink url="https://wiki.openstreetmap.org/wiki/API_v0.6#GPS_Traces"/> for further detail.
</para>
<section><title>Uploading data to OpenStreetMap</title>
<para>
It is possible to upload data directly from &appname; to OpenStreetMap.
</para>
<formalpara>
<title>Upload a layer</title>
<para>
One solution is to upload whole a <xref linkend="TrackWaypoint"/> layer. To do this,
simply select the layer and right click on it. Then, select <guimenuitem>Upload to
OSM</guimenuitem>.
</para>
</formalpara>
<formalpara>
<title>Upload a single track</title>
<para>Another solution is to upload an individual track. Simply select the track and right click on it.
Then select <guimenuitem>Upload to OSM</guimenuitem>.
</para>
</formalpara>
<formalpara>
<title>Fill in the form</title>
<para>
The filename is the name you want your upload has on the server. This information is displayed by the osm server.
The description is some descriptive information.
The tags field is a white space separated list of tags.
</para>
</formalpara>
</section>

<section id="osm_dl" xreflabel="OpenStreetMap Traces Download"><title>Downloading Traces from OpenStreetMap</title>
<para>
It is possible to download GPS traces directly from OpenStreetMap into &appname;.
This feature can be really useful for checking existing data before uploading new ones.
</para>
<formalpara>
<title>Download all visible tracks</title>
<para>One solution is to select
<menuchoice>
<guimenu>File</guimenu>
<guisubmenu>Acquire</guisubmenu>
<guimenuitem>OSM traces...</guimenuitem>
</menuchoice>.
Each request can get up to 5,000 points.
The dialog box allows setting which group of 5,000 points to get. These groups are known as <emphasis>Page Numbers</emphasis> which start at 0.
Increasing the page number parameter allows one to request the subsequent sets of point groups.
</para>
</formalpara>
</section>
<section id="osm_my_dl" xreflabel="OpenStreetMap My Traces Download"><title>Downloading Your Own Traces from OpenStreetMap</title>
<para>
It is possible to download any of <emphasis>your personal</emphasis> GPS traces previously uploaded to OpenStreetMap into &appname;.
</para>
<para>
Initially this will return the list of your OSM Traces, from which you can select which specific traces to retrieve.
This list can be sorted on each column so that it easier to find an individual trace or select a group of traces by similar properties.
</para>
</section>

</section>

<section><title>Geotagging</title>
<para>
	This assumes you already have a <xref linkend="Map"/> layer enabled for ease of use (if not see above to get one).
</para>
<section><title>Manual Positioning</title>
<para>
	This is useful for instances when you already know exactly where the image was taken (no need for tracklog).
	Or maybe you want to adjust an automatically generated waypoint for the position of the subject of the image rather than the location that the photograph is taken from.
	ATM this process only works on an individual image, so it will be tedious for handling lots of images.
</para>
<para>
	First create a <xref linkend="TrackWaypoint"/> layer or use an existing one; and select it in the <xref linkend="gc_layers_panel"/>.
	NB Make sure this layer is above the <xref linkend="Map"/> layer in the Layers Panel list.
	Create a new waypoint (or move an existing one) to exact location desired:
<itemizedlist>
	<listitem><para>Select the <xref linkend="createwptool"/> tool, then left click on the map at the location desired, choosing an image to associate with it in the new waypoint dialog</para></listitem>
	<listitem><para>Select the <xref linkend="selecttool"/> tool, then left click on waypoint to be moved. Left click again and drag the waypoint to the location desired</para></listitem>
</itemizedlist>
	Then using the Select tool left click on waypoint to select it, then right click to access the Waypoint properties menu, then choose
	<menuchoice><guimenu>Update Geotag on Image</guimenu><guisubmenu>Update</guisubmenu></menuchoice>
</para>
<para>
	The <guilabel>Update Geotag on Image</guilabel> options are only available when a waypoint has an image associated with it.
</para>
</section>

<section><title>Automatic Positioning Against a Tracklog</title>
<para>
	First you will need a tracklog with timestamps in it. Either load one from a previously saved file or freshly acquired from a GPS device -
	see <link linkend="howto_start">Getting Started</link>.
	It helps if this is the track that was recorded at the time you took some photographs!
</para>
<para>
	Select the track either from the layers panel on the left or via the viewport using the <xref linkend="selecttool"/> tool.
	Then right click on it and chose the <menuchoice><guimenu>Geotag Images...</guimenu></menuchoice> leading you to the <xref linkend="geotagging"/> Dialog.
</para>
<para>
	Load some images that where taken around the time the track log was recorded. Confirm the other options in the dialog - normally the defaults should be alright and select OK.
	If things are successful, new waypoints with thumbnail images of the photographs will appear.
	You should probably check they are really in the right place as often the timestamp of the camera may not be aligned to the GPS correctly leading to inferring incorrect locations.
</para>
<formalpara><title>Option: Overwrite Waypoints</title>
<para>
	This is particularly useful when one finds an attempt at geotagging gives wrong locations, often due to time offset issues.
	Simply try again with a new time offset (often 1 hour adjustments due to Daylight Savings or Summer Time times) and the old waypoints will be updated (instead of creating new ones).
</para>
</formalpara>
<para>
	If you have multiple tracks in a <xref linkend="TrackWaypoint"/> layer, then invoking the <menuchoice><guimenu>Geotag Images...</guimenu></menuchoice> action on the layer
	will search all the tracks to find location matches.
</para>
</section>
</section>

<section id="gpsd"><title>GPS Real Time Location</title>
<para>
	&appname; relies on <ulink url="https://gpsd.gitlab.io/gpsd">GPSD</ulink> (via the GPSD service library client) to provide the current location from a real time feed from a GPS device. 
</para>
<note>
<para>
  At the time of writing the GPSD service itself is supported on the following platforms: "Presently Linux, OpenBSD and NetBSD are directly supported... Apple's OS X is supported in a limited fashion.". i.e. Explicitly <emphasis>not on Windows</emphasis>.
</para>
<para>
  On Windows &appname; provides a GPSD client to connect with the server (service daemon) instance of the GPSD which would be running on different (supported platform) machine. For instance notionally one could run a virtual machine instance of a BSD variant on the Windows host, run GPSD on this BSD instance and then make &appname; connect to that GPSD instance.
</para>
<para>
  Running the GPSD service is outside the scope of &appname;.
</para>
</note>
<para>
	This assumes you already have a <xref linkend="Map"/> layer enabled for ease of use (if not see above to get one).
</para>
<para>
	Turn on the GPS Device, ensure it has figured out it's location and plug it in to your computer.
</para>
<section><title>Set Up GPS Layer</title>
<para>
	You will need a <xref linkend="GPS"/> layer. One can be added via <menuchoice><guimenu>Layers</guimenu><guisubmenu>Add GPS Layer</guisubmenu></menuchoice>.
</para>
<para>
	Adjust the <emphasis>Realtime Tracking Mode</emphasis> settings to interface with <ulink url="https://gpsd.gitlab.io/gpsd">gpsd</ulink> as necessary. Normally the defaults should suffice.
</para>
<para>
  Current Linux distributions should run <application>gpsd</application> automatically when a GPS Device is plugged in. Otherwise you may have to run <application>gpsd</application> manually.
</para>
<para>
  The viewport should jump to the GPS location as by default &appname; continually attempts to connect to GPSD.
  Otherwise right-click the layer and select <guimenuitem>Start Realtime Tracking</guimenuitem>.
</para>
<para>
  Troubleshooting checklist:
</para>
<procedure><step><para>Confirm <application>gpsd</application> is running.</para></step></procedure>
<procedure><step><para>Confirm on the GPS device it has a location.</para></step></procedure>
<procedure><step><para>Confirm the <emphasis>Realtime Tracking Mode</emphasis> settings.</para></step></procedure>
</section>
</section>

<section><title>What to Do if &appname; Does Not Seem to Work</title>
<important>
<para>
  The latest versions of &appname; now captures logging messages, which can be accessed via a button in the middle of the statusbar, or via <menuchoice><guimenu>View</guimenu><guimenuitem>Log</guimenuitem></menuchoice>. The statusbar shows the number of log messages. The debug status itself can also be controlled from the GUI itself, use <menuchoice><guimenu>Help</guimenu><guimenuitem>Debug</guimenuitem></menuchoice> to toggle the setting in order to capture more messages. The log window displays the newest messages at the top.
</para>
</important>

<para>
  For older versions of &appname;, in order to get some information about what it is doing, start it in verbose debug mode via the command line:
<programlisting>viking -dV</programlisting>
</para>
<para>
NB For <trademark>Windows</trademark> the process is slightly more involved as the output is typically not shown in the command prompt,
so you have to redirect the output to a file, e.g. open the command prompt and then:
<programlisting>
cd "C:\Program Files\Viking"
viking -dV 2>1 > %TMP%\viking.log
</programlisting>
Then close &appname; before viewing the output file, such as:
<programlisting>notepad %TMP%\viking.log</programlisting>
</para>

<para>
For instance you can check the correct URLs &appname; is using in requesting remote data for DEMs or map tiles in the verbose debug output.
E.g. Something like this for DEMs:
<screen>
** (viking:28778): DEBUG: curl_download_uri: uri=http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/N48E008.hgt.zip
* About to connect() to dds.cr.usgs.gov port 80 (#0)
* Trying 152.61.128.95... * connected
* Connected to dds.cr.usgs.gov (152.61.128.95) port 80 (#0)
 GET /srtm/version2_1/SRTM3/Eurasia/N48E008.hgt.zip HTTP/1.1
User-Agent: viking/0.9.8 libcurl/7.18.2 GnuTLS/2.4.2 zlib/1.2.3.3 libidn/1.8
Host: dds.cr.usgs.gov
Accept: */*
 HTTP/1.1 200 OK
 Date: Sun, 26 Jul 2009 18:13:38 GMT
 Server: Apache
 Last-Modified: Tue, 21 Jul 2009 19:57:35 GMT
 ETag: eac3f8-1828f5-46f3caa76070a
 Accept-Ranges: bytes
 Content-Length: 1583349
 Content-Type: application/zip

* Connection #0 to host dds.cr.usgs.gov left intact
* Closing connection #0
** (viking:28778): DEBUG: dem_layer_add_file: /home/username/.viking-maps/srtm3-Eurasia/N48E008.hgt.zip
</screen>
Or for OSM Mapnik tile server:
<screen>
* About to connect() to tile.openstreetmap.org port 80 (#0)
*   Trying 193.63.75.28... * connected
* Connected to tile.openstreetmap.org (193.63.75.28) port 80 (#0)
 GET /13/4065/2748.png HTTP/1.1
User-Agent: viking/0.9.96 libcurl/7.20.1 GnuTLS/2.8.6 zlib/1.2.3.4 libidn/1.18
Host: tile.openstreetmap.org
Accept: */*

* HTTP 1.0, assume close after body
 HTTP/1.0 200 OK
 Date: Thu, 14 Oct 2010 22:18:42 GMT
 Server: Apache/2.2.8 (Ubuntu)
 ETag: "b66ff9d46474bab68262a3483428a232"
** (viking:16704): DEBUG: curl_get_etag_func: ETAG found: "b66ff9d46474bab68262a3483428a232"
 Content-Length: 17194
 Cache-Control: max-age=94805
 Expires: Sat, 16 Oct 2010 00:38:47 GMT
 Content-Type: image/png
 Age: 5153
 X-Cache: HIT from konqi.openstreetmap.org
 X-Cache-Lookup: HIT from konqi.openstreetmap.org:3128
 Via: 1.1 konqi.openstreetmap.org:3128 (squid/2.7.STABLE7)
 Connection: close
 
* Closing connection #0
* About to connect() to a.andy.sandbox.cloudmade.com port 80 (#0)
*   Trying 178.63.75.195... ** (viking:16704): DEBUG: curl_download_uri: uri=http://tile.openstreetmap.org/13/4065/2749.png
* About to connect() to tile.openstreetmap.org port 80 (#0)
*   Trying 193.63.75.28... * connected
* Connected to a.andy.sandbox.cloudmade.com (178.63.75.195) port 80 (#0)
 GET /tiles/cycle/13/4065/2747.png HTTP/1.1
User-Agent: viking/0.9.96 libcurl/7.20.1 GnuTLS/2.8.6 zlib/1.2.3.4 libidn/1.18
Host: a.andy.sandbox.cloudmade.com
Accept: */*

* connected
* Connected to tile.openstreetmap.org (193.63.75.28) port 80 (#0)
 GET /13/4065/2749.png HTTP/1.1
User-Agent: viking/0.9.96 libcurl/7.20.1 GnuTLS/2.8.6 zlib/1.2.3.4 libidn/1.18
Host: tile.openstreetmap.org
Accept: */*

* HTTP 1.0, assume close after body
 HTTP/1.0 200 OK
 Date: Thu, 14 Oct 2010 23:44:35 GMT
 Server: Apache/2.2.8 (Ubuntu)
 ETag: "8e520ad47ce9c1b63430554886eb5fab"
** (viking:16704): DEBUG: curl_get_etag_func: ETAG found: "8e520ad47ce9c1b63430554886eb5fab"
 Content-Length: 18094
 Cache-Control: max-age=87742
 Expires: Sat, 16 Oct 2010 00:06:57 GMT
 Content-Type: image/png
 X-Cache: MISS from konqi.openstreetmap.org
 X-Cache-Lookup: MISS from konqi.openstreetmap.org:3128
 Via: 1.1 konqi.openstreetmap.org:3128 (squid/2.7.STABLE7)
 Connection: close
</screen>
</para>
</section>

</section>
<!-- End of Howtos -->

<section id="extend_viking" xreflabel="Extending Viking">
    <title>Extending Viking</title>

      <para>Currently, &app; 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>
      <para>Here is an example:
<programlisting><![CDATA[
<objects>
  <object class="ClassName">
    <property name="property_name1">Property value</property>
    <property name="property_name2">Property value</property>
  </object>
  ...
<objects>
]]>
</programlisting>
</para>
      <para>You can find more examples as installed on your system and in the documentation part of the distribution. Typically these will be installed into one of the $XDG_DATA_DIR locations, such as <filename>/usr/share/viking/</filename> or <filename>C:\Program Files\Viking\data</filename> depending on the Operating System.</para>
      <para>
	It is also possible to override the internal defaults e.g. to update any parameters should they change over time,
	by adding the values into your configuration file.
	When you define object group that already exists (and for Maps this means by a repeated Id key, but you may have to examine the source code to work out what the relevant Id values are) then you need to define all the other keys as well, otherwise they will be reset to the defaults.
      </para>
      <section id="map_source" xreflabel="Map Source Extensions">
        <title>Map Sources</title>
        <para>It is possible to add new map sources. The file is <filename>maps.xml</filename> placed in your <xref linkend="config_file_loc"/></para>
        <para>An example of the file is in the distribution <filename>doc/examples/maps.xml</filename>. Further examples and values are online in the <ulink url="https://sourceforge.net/p/viking/wikiallura/Maps/">Maps Wiki</ulink></para>

        <para>The <classname>VikSlippyMapSource</classname> allows declaration of any map source working like OpenStreetMap. It supports the following properties:
          <variablelist>
            <varlistentry>
              <term>id</term>
              <listitem><para>this is an integer and should be unique as it used to identify the map source</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>name</term>
              <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>
            </varlistentry>
            <varlistentry>
              <term>label</term>
              <listitem><para>the text displayed in the map's source selection dialog</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>hostname</term>
              <listitem><para>the server's hostname (eg. "tile.openstreetmap.org")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url</term>
              <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>
		<note>
		  <para>The full parametrized address can just be put in the URL field and the hostname field doesn't need specifying.</para>
		  <para>e.g. "https://tile.openstreetmap.org/%d/%d/%d.png"</para>
		</note>
	      </listitem>
            </varlistentry>
            <varlistentry>
              <term>custom-http-headers (optional)</term>
              <listitem>
                <para>Custom HTTP headers to be added to the download request. The default is none.</para>
                <para>Multiple headers can be specified by separating each part with an '\n'.</para>
                <para>The header allows of substition of values of the positional Z, X and Y (in that order) values, as per the <emphasis>url</emphasis> option above. Using multiple and/or different ordered values can be acheived via printf() positional argument specifiers. For example:</para>
                <para><literal>DNT: 1\nLine2: %d %d %d\nReordered: %3$d %1$d %2$d\nUser-Agent: Mozilla/5.0</literal></para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>copyright (optional)</term>
              <listitem><para>The copyright of the map source.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>license (optional)</term>
              <listitem><para>The license of the map source.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>license-url (optional)</term>
              <listitem><para>The URL of the license of the map source.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>zoom-min (optional)</term>
              <listitem><para>The minimum Tiled Web Map zoom value supported by the tile server. The Default is 0 if not specified.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>zoom-max (optional)</term>
              <listitem>
                 <para>The maximum Tiled Web Map zoom value supported by the tile server. The Default is 18 if not specified.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>lat-min (optional)</term>
              <listitem><para>The minimum latitude value in degrees supported by the tile server. The Default is -90 degrees if not specified.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>lat-max (optional)</term>
              <listitem><para>The maximum latitude value in degrees supported by the tile server. The Default is 90 degrees if not specified.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>lon-min (optional)</term>
              <listitem><para>The minimum longitude value in degrees supported by the tile server. The Default is -180 degrees if not specified.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>lon-max (optional)</term>
              <listitem><para>The maximum longitude value in degrees supported by the tile server. The Default is 180 degrees if not specified.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>file-extension (optional)</term>
              <listitem>
                <para>The file extension of the files on disk. The default is <emphasis>.png</emphasis></para>
                <para>If the tile source URL ends in something other than .png, then this parameter will need to match it.</para>
                <para>This can also be useful in reading a tileset from other software which may name tiles in an alternative form,
                      e.g. for Mobile Atlas creator it names them <emphasis>.png.tile</emphasis></para>
                <note><para>The file types actually usable are those supported by GDK Pixbuf Library, which includes at least PNG and JPEG.</para></note>
                <note><para>Remember to include the beginning <emphasis>'.'</emphasis> when specifying this parameter.</para></note>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>use-direct-file-access (optional)</term>
              <listitem>
                <para>Only use files on disk. The default is <emphasis>FALSE</emphasis></para>
                <para>This can also be useful for tilesets already on disk as it will avoid attempting to download any tiles.</para>
                <para>Thus with this type the <emphasis>hostname</emphasis> and <emphasis>url</emphasis> parameters are not necessary and are ignored.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>offset-x (optional)</term>
              <listitem>
                <para>The offset of the map in the x plane (towards east) in metres. The default is 0.0 if not specified.</para>
                <para>Use negative numbers to adjust in a westerly direction.</para>
                <para>Typical usage would be aligning differing maps, e.g. aerial imagery may be offset from cadastral maps.</para>
                <para>Currently this is a single value that applies to all zoom levels.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>offset-y (optional)</term>
              <listitem>
                <para>The offset of the map in the y plane (towards north) in metres. The default is 0.0 if not specified.</para>
                <para>Use negative numbers to adjust in a southerly direction.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>switch-xy (optional)</term>
              <listitem>
                <para>Swap the X,Y values around in the URL parametrized ordering.</para>
                <para>The default is false.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>check-file-server-time (optional)</term>
              <listitem>
                <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>
                <para>The default is false.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>use-etag (optional)</term>
              <listitem>
                <para>Use and compare the <ulink url="https://en.wikipedia.org/wiki/HTTP_ETag">ETag</ulink> value in determining whether to download a newer tile. The default is false.</para>
                <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>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>referer (optional)</term>
              <listitem><para>A URL to serve as referer for the HTTP request (eg. "http://hostname/")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>follow-location (optional)</term>
              <listitem><para>The maximum number of redirects allowed. The default is 0, i.e. no redirection. Use -1 for an unlimited number of redirects.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>tilesize-x (optional)</term>
              <listitem><para>The tile x size. The default is 256 pixels if not specified.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>tilesize-y (optional)</term>
              <listitem><para>The tile y size. The default is 256 pixels if not specified.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>scale (optional)</term>
              <listitem>
		<para>The tile scale. The scale is 1 if not specified.</para>
                <note><para>Use a value of 2 to represent high res tiles.
		Don't change the tilesize as the internal display size is still based on 256 pixels.
		</para></note>
              </listitem>
            </varlistentry>
          </variablelist>
        </para>
        <para></para>
        <para>The <classname>VikTmsMapSource</classname> allows declaration of any TMS service. A TMS (Tile Map Service) is defined in <ulink url="https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification">Tile Map Service Specification</ulink>. The configuration supports the following properties (as per <classname>VikSlippyMapSource</classname> above):</para>
        <para>
          <simplelist>
              <member>id</member>
              <member>label</member>
              <member>hostname</member>
              <member>url</member>
              <member>custom-http-headers (optional)</member>
              <member>copyright (optional)</member>
              <member>license (optional)</member>
              <member>license-url (optional)</member>
              <member>check-file-server-time (optional)</member>
              <member>follow-location (optional)</member>
              <member>referer (optional)</member>
              <member>zoom-min (optional)</member>
              <member>zoom-max (optional)</member>
              <member>lat-min (optional)</member>
              <member>lat-max (optional)</member>
              <member>lon-min (optional)</member>
              <member>lon-max (optional)</member>
              <member>file-extension (optional)</member>
              <member>scale (optional)</member>
              <member>tilesize-x (optional)</member>
              <member>tilesize-y (optional)</member>
              <member>offset-x (optional)</member>
              <member>offset-y (optional)</member>
          </simplelist>
        </para>
        <para></para>
        <para>The <classname>VikWmscMapSource</classname> allows declaration of any WMS or WMS-C service. A WMS (Web Map Service) is defined in <ulink url="https://wiki.osgeo.org/wiki/WMS_Tile_Caching">WMS Tile Caching</ulink>. The configuration supports the following properties (as per <classname>VikSlippyMapSource</classname> above):</para>
        <para>
          <simplelist>
              <member>id</member>
              <member>label</member>
              <member>hostname</member>
              <member>url</member>
              <member>custom-http-headers (optional)</member>
              <member>copyright (optional)</member>
              <member>license (optional)</member>
              <member>license-url (optional)</member>
              <member>check-file-server-time (optional)</member>
              <member>follow-location (optional)</member>
              <member>referer (optional)</member>
              <member>zoom-min (optional)</member>
              <member>zoom-max (optional)</member>
              <member>lat-min (optional)</member>
              <member>lat-max (optional)</member>
              <member>lon-min (optional)</member>
              <member>lon-max (optional)</member>
              <member>file-extension (optional)</member>
              <member>scale (optional)</member>
              <member>tilesize-x (optional)</member>
              <member>tilesize-y (optional)</member>
              <member>offset-x (optional)</member>
              <member>offset-y (optional)</member>
          </simplelist>
        </para>
      </section>

      <section id="search_provider">
        <title>Go-to Search Engines</title>
        <para>It is possible to add new new search engines for the "Go-To" feature. The file is <filename>goto_tools.xml</filename>  placed in your <xref linkend="config_file_loc"/>.</para>
        <para>An example of the file in the distribution <filename>doc/examples/goto_tools.xml</filename>.</para>
        <para>Currently, there is a single object class available: <classname>VikGotoXmlTool</classname>. This feature allows one to declare any search engine using a XML format as result.</para>
        <para>The related properties are:
          <variablelist>
            <varlistentry>
              <term>label</term>
              <listitem><para>the text displayed in the <guilabel>Go-To</guilabel> dialog</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url-format</term>
              <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>
            </varlistentry>
            <varlistentry>
              <term>lat-path</term>
              <listitem><para>XML path of the latitude (eg. <literal>/root/parent/elem</literal>)</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>lat-attr (optional)</term>
              <listitem><para>name of the attribute (of previous element) containing the latitude</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>lon-path</term>
              <listitem><para>XML path of the longitude (eg. <literal>/root/parent/elem</literal>)</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>lon-attr (optional)</term>
              <listitem><para>name of the attribute (of previous element) containing the longiude</para></listitem>
            </varlistentry>
          </variablelist>
        </para>
        <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>
      </section>

      <section>
        <title>External Tools</title>
        <para>It is possible to add new external tools. The file is <filename>external_tools.xml</filename> placed in your <xref linkend="config_file_loc"/>.</para>
        <para>An example of the file in the distribution <filename>doc/examples/external_tools.xml</filename>.</para>
        <para>The <classname>VikWebtoolCenter</classname> allows one to declare any Webtool using a logic based on center coordinates and zoom level value.</para>
        <para>The related properties are:
          <variablelist>
            <varlistentry>
              <term>label</term>
              <listitem><para>the text displayed in the menu entry</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url</term>
              <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>
            </varlistentry>
          </variablelist>
        </para>
        <para>The <classname>VikWebtoolBounds</classname> allows one to declare any Webtool using a logic based on bounds coordinates.</para>
        <para>The related properties are:
          <variablelist>
            <varlistentry>
              <term>label</term>
              <listitem><para>the text displayed in the menu entry</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url</term>
              <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>
            </varlistentry>
          </variablelist>
        </para>
      </section>
      
      <section>
        <title>Routing Engines</title>
        <para>It is possible to declare new routing engines. The file is <filename>routing.xml</filename> placed in your <xref linkend="config_file_loc"/>.</para>
        <para>An example of the file in the distribution <filename>doc/examples/routing.xml</filename>.</para>
        <para>The <classname>VikRoutingWebEngine</classname> allows one to declare a routing engine available via HTTP.</para>
        <para>The related properties are:
          <variablelist>
            <varlistentry>
              <term>id</term>
              <listitem><para>a string, should be unique as it used to identify the routing engine</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>label</term>
              <listitem><para>the text displayed in the menu entry</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>format</term>
              <listitem>
		<para>The <application>GPSBabel</application> format code to interpret the service response. By default a GPX response is expected and processed internally. However if the service returns a different format then <application>GPSBabel</application> is used to transform the text into something that &appname; can understand. Only formats that <application>GPSBabel</application> supports can be used: e.g. <emphasis>gtrnctr</emphasis> (for Garmin Training Center .tcx files), etc...</para>
		<para>Use <command>gpsbabel --help</command> on the command line to find out the supported file types and their codes to process them.</para>
		<para>Some format codes are handled natively by &appname; such as <emphasis>gpx</emphasis> and <emphasis>kml</emphasis>.</para>
		<para>A special format code of <emphasis>viking-geojson-osrm</emphasis> is available for handling responses by <ulink url="http://project-osrm.org/">OSRM</ulink> route servers.</para>
	      </listitem>
            </varlistentry>
            <varlistentry>
              <term>url-base</term>
              <listitem><para>the base URL of the web service (eg. "http://hostname/service?")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url-start-ll</term>
              <listitem><para>the part of the URL setting the starting point location, parametrized in the spirit of C printf format, with 2 "%s" for coordinates (eg. "&amp;start=%s,%s")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url-stop-ll</term>
              <listitem><para>the part of the URL setting the end point location, parametrized in the spirit of C printf format, with 2 "%s" for coordinates (eg. "&amp;stop=%s,%s")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url-via-ll (optional)</term>
              <listitem><para>the part of the URL setting via point location, parametrized in the spirit of C printf format, with 2 "%s" for coordinates (eg. "&amp;via=%s,%s")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url-start-dir (optional)</term>
              <listitem><para>the part of the URL setting the starting point location for direction based routing, parametrized in the spirit of C printf format, with one "%s" for direction (eg. "&amp;start=%s")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url-stop-dir (optional)</term>
              <listitem><para>the part of the URL setting the end point location for direction based routing, parametrized in the spirit of C printf format, with one "%s" for direction (eg. "&amp;stop=%s")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url-ll-lat-first (optional)</term>
              <listitem><para>The ordering of the lat/long terms in the Start, Stop and Via URL settings. By default this is TRUE.</para>
	      <para>For instance using Brouter services, the URL uses a pair of values which is longitude and then latitude. Thus setting this value to FALSE ensures the value substitution is performed in the necessary order.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>referer (optional)</term>
              <listitem><para>A URL to serve as referer for the HTTP request (eg. "http://hostname/")</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>follow-location (optional)</term>
              <listitem><para>The maximum number of redirects allowed. The default is 0, i.e. no redirection. Use -1 for an unlimited number of redirects.</para></listitem>
            </varlistentry>
          </variablelist>
        </para>
      </section>
      
      <section>
        <title>Remote File Datasources</title>
        <para>It is possible to add web references expected to return a file which can then be opened directly or converted via GPSBabel.</para>
        <para>The file is <filename>datasources.xml</filename> placed in your <xref linkend="config_file_loc"/>.</para>
        <para>An example of the file is in the source distribution <filename>doc/examples/datasources.xml</filename>.</para>
        <para>The <classname>VikWebtoolDatasource</classname> allows one to declare any URL using logic based on coordinates.</para>
        <para>The related properties are:
          <variablelist>
            <varlistentry>
              <term>label</term>
              <listitem><para>the text displayed in the menu entry</para></listitem>
            </varlistentry>
            <varlistentry>
              <term>url</term>
              <listitem>
                <para>the parametrized URL to open in the spirit of C printf format, with up to 9 "%s" values. e.g. <literal>http://hostname/getfile?lat=%s&amp;lon=%s</literal></para>
                <para>The order and meaning of these parameters is given by the url_format_code below</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>url_format_code</term>
              <listitem>
                <para>A string describing the parametrized URL substitution parameters, each character represents how to translate each term.</para>
                <para>B = Bottom of the current view i.e. minimum latitude</para>
                <para>L = Left of the current view i.e. minimum longitude</para>
                <para>T = Top of the current view i.e. maximum latitude</para>
                <para>R = Right of the current view i.e. maximum longitude</para>
                <para>A = center lAtitude of the current view</para>
                <para>O = center lOngitude of the current view</para>
                <para>Z = OSM Zoom value of the current view. See <ulink url="https://wiki.openstreetmap.org/wiki/Zoom_levels">Zoom Levels</ulink></para>
                <para>P = selected Point's latitude</para>
                <para>N = selected poiNt's longitude</para>
                <para>S = A user specified input string requested from the user via a dialog box</para>
                <para>Thus for the url example above then the format code should be <emphasis>AO</emphasis></para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>file_type</term>
              <listitem>
                <para>This value is passed on for the -i parameter in interfacing with GPSBabel.</para>
                <para>If it is not defined then the returned file is interpreted internally as a GPX file.</para>
                <para>Possible values such as 'kml', 'mapsource' etc.. can be used. See <ulink url="https://www.gpsbabel.org/capabilities.html">GPSBabel File Formats</ulink> for the full list.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>babel_filter_args</term>
              <listitem>
                <para>This value is passed on for the filter arguments interfacing with GPSBabel.</para>
                <para>E.g. "-x nuketypes,routes" can be used to filter all routes from the results.</para>
              </listitem>
            </varlistentry>
            <varlistentry>
              <term>input_label</term>
              <listitem>
                <para>This value is used when requesting input from the user.</para>
                <para>It is the label of the text input box.</para>
              </listitem>
            </varlistentry>
          </variablelist>
        </para>
      </section>

      <section>
        <title>System Extension File Locations</title>
        <para>Note that, on <trademark>UNIX</trademark> like systems, the extension files (&extfiles;) are also searched in <filename>/etc/viking</filename> and <filename>/usr/share/viking</filename> directories (or related in your system).</para>
        <para>The <envar>$XDG_DATA_DIRS</envar> environment variable can be used to change these directories.</para>
        <para>The <envar>$XDG_DATA_HOME</envar> environment variable is also used (if set) to look for these extension files.</para>
      </section>

      <section id="config_file_loc" xreflabel="User Configuration File Location">
        <title>User Configuration File Location</title>
        <para>Viking looks for its configuration files (<filename>viking.prefs</filename>, <filename>viking.ini</filename>, <filename>viking.ini</filename> and <filename>keys.rc</filename>) in a specific directory, searching legacy locations first before trying new locations. Thus if you upgrade &appname; it will continue to use your existing setup.</para>
        <para>For <trademark>UNIX</trademark> like systems:</para>
        <variablelist>
          <varlistentry>
            <term>Up to v1.8</term>
            <listitem>
              <para><filename>~/.viking/</filename></para>
              <para>(typically <filename>/home/<replaceable>username</replaceable>/.viking</filename>)</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>From v1.9 onwards</term>
            <listitem>
              <para><ulink url="https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG Base Directory compliant</ulink></para>
              <para>Typically <filename>~/config/viking/</filename></para>
            </listitem>
          </varlistentry>
        </variablelist>
        <para>For <trademark>Windows</trademark> systems:</para>
        <variablelist>
          <varlistentry>
            <term>v1.8 or earlier</term>
            <listitem>
              <para><filename>C:\Users\<replaceable>username</replaceable>\.viking</filename></para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>v1.9 onwards</term>
            <listitem>
              <para><filename>C:\Users\<replaceable>username</replaceable>\AppData\Local\viking</filename></para>
            </listitem>
          </varlistentry>
        </variablelist>
        <para>For <trademark>Mac</trademark>:</para>
        <para><filename>/Library/Application Support/Viking</filename></para>

        <note>
          <para>
            If you've upgraded &app; to v1.9 and want it to use the new location, you will have to manually move the existing directory (when &app; is not running). e.g. in the command line: <command>mv ~/.viking ~/.config/viking</command>
          </para>
        </note>
      </section>

      <section id="misc_settings" xreflabel="Miscellaneous Settings">
        <title>Miscellaneous Settings</title>
        <para>Various individual values are automatically saved between &app; sessions in the <filename>viking.ini</filename> file placed in your <xref linkend="config_file_loc"/>.</para>
        <para>This file is not intended to be manually edited, but since it is a plain text file it can be changed if desired.</para>
        <para>Some values in this file are <emphasis>read only</emphasis>, in the sense that there is no way to set it other than by manually entering in the keys and values (the key will not exist in the file otherwise). This allows some fine tuning of &app; behaviours, without resorting to recompiling the code. However is it not expected that these values should need to be changed for a normal user, hence no GUI options for these have been provided.</para>
        <para>Here is the list of the <emphasis>read only</emphasis> keys and their default values.</para>
	<itemizedlist>
	  <listitem>
	    <para>curl_cainfo=NULL</para>
	    <para>See <ulink url="https://curl.haxx.se/libcurl/c/CURLOPT_CAINFO.html">CURLOPT_CAINFO</ulink></para>
	  </listitem>
	  <listitem>
	    <para>For <trademark>UNIX</trademark> like systems: curl_ssl_verifypeer=1</para>
	    <para>For <trademark>Windows</trademark> systems: curl_ssl_verifypeer=0</para>
	    <para>See <ulink url="https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html">CURLOPT_SSL_VERIFYPEER</ulink></para>
	    <note><para>If you encounter issues downloading from https sources, setting this to 0 should get HTTPS connections to work. For <trademark>UNIX</trademark> like operating systems SSL Certificate management is typically handled system wide and trusted certficate issuers updated regularly. Whereas for &appname; under Windows this is only done at installation/version update time and so may become out of date or encounter unknown sources and thus more likely to raise verification failures. Hence this is why is is turned off by default on <trademark>Windows</trademark> - especially to ensure the default Maps of OpenTopoMap work without manual user intervention.</para></note>
	  </listitem>
	  <listitem>
	    <para>curl_user_agent=NULL</para>
            <para>Override the default HTTP User-Agent (which is otherwise generated automatically from a combination of &appname;'s name, the version and curl information) set in all download requests with the value specified.</para>
	    <para>Also see <ulink url="https://curl.se/libcurl/c/CURLOPT_USERAGENT.html">CURLOPT_USERAGENT</ulink></para>
            <para>NB The User Agent for individual map downloads can be set via the map property <emphasis>custom-http-headers</emphasis></para>
	  </listitem>
	  <listitem>
	    <para>geoclue_accuracy_level=4</para>
	    <para>Set the integer value for the accuracy level request to the GeoClue service. Values to match the <ulink url="https://www.freedesktop.org/software/geoclue/docs/libgeoclue/libgeoclue-gclue-enums.html#GClueAccuracyLevel">GClueAccuracyLevel</ulink>:</para>
	    <itemizedlist>
	      <listitem><para>0 = GCLUE_ACCURACY_LEVEL_NONE</para></listitem>
	      <listitem><para>1 = GCLUE_ACCURACY_LEVEL_COUNTRY</para></listitem>
	      <listitem><para>4 = GCLUE_ACCURACY_LEVEL_CITY</para></listitem>
	      <listitem><para>5 = GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD</para></listitem>
	      <listitem><para>6 = GCLUE_ACCURACY_LEVEL_STREET</para></listitem>
	      <listitem><para>8 = GCLUE_ACCURACY_LEVEL_EXACT</para></listitem>
	    </itemizedlist>
	  </listitem>
	  <listitem>
	    <para>gpx_tidy_points=true</para>
	    <para>ATM Only attempts to remove a suspicious first point of a GPX track
	                (as opposed to any points within a track).</para>
	  </listitem>
	  <listitem>
	    <para>gpx_tidy_points_max_speed=340</para>
	    <para>Over this speed (in metres per second) for the first pair of points - the first point is removed.</para>
	  </listitem>
	  <listitem>
	    <para>layers_create_trw_auto_default=false</para>
	    <para>Create new TrackWaypoint layers without showing the layer properties dialog first.</para>
	  </listitem>
	  <listitem>
	    <para>layers_panel_calendar_markup_mode=3</para>
	    <para>0=No markups. 1=Day marked. 2=Day marked and tooltips created. 3=Auto (timed tooltip creation, so if too slow it reverts to 1).</para>
            <para>
              If the following message is shown in the message log:<blockquote><para><emphasis>vik_layers_panel_calendar_update: detail level reduced as taking too long</emphasis></para></blockquote>then consider setting this value to 2 - although with the caveat that calendar refreshes may introduce noticable delays.
            </para>
	  </listitem>
	  <listitem>
	    <para>maps_max_tiles=1000</para>
	  </listitem>
	  <listitem>
	    <para>maps_min_shrinkfactor=0.0312499</para>
	  </listitem>
	  <listitem>
	    <para>maps_max_shrinkfactor=8.0000001</para>
	  </listitem>
	  <listitem>
	    <para>maps_real_min_shrinkfactor=0.0039062499</para>
	  </listitem>
	  <listitem>
	    <para>maps_scale_inc_down=4</para>
	  </listitem>
	  <listitem>
	    <para>maps_scale_inc_up=2</para>
	  </listitem>
	  <listitem>
	    <para>maps_scale_smaller_zoom_first=true</para>
	  </listitem>
	  <listitem>
	    <para>modifications_ignore_visibility_toggle=false</para>
            <para>Particularly if one often views large .vik files,
              then changing the visibility of items may be considered just part of the viewing process.
              Thus maybe you don't want to be notified on exit about such things -
              in this case you can set this value to true.
            </para>
	  </listitem>
	  <listitem>
	    <para>srtm_http_base_url=https://dds.cr.usgs.gov/srtm/version2_1/SRTM3</para>
	    <para>Allows using an alternative service for acquiring DEM SRTM files.
	    Note that the layout on the server needs to be split into Continent directories.</para>
	  </listitem>
	  <listitem>
	    <para>mapnik_buffer_size=128 (in pixels)</para>
	  </listitem>
	  <listitem>
	    <para>osm_basic_auth=false</para>
	    <para>Set to true to force the use of HTTP Basic Authentication even when OAuth is available</para>
	  </listitem>
	  <listitem>
	    <para>background_max_threads=10</para>
	  </listitem>
	  <listitem>
	    <para>background_max_threads_local=<emphasis>Number of CPUs</emphasis></para>
	  </listitem>
	  <listitem>
	    <para>window_default_tool=Select</para>
	    <para>Options are: Pan, Zoom, Ruler or Select</para>
	  </listitem>
	  <listitem>
	    <para>window_menubar=true</para>
	  </listitem>
	  <listitem>
	    <para>window_copy_centre_full_format=false</para>
	  </listitem>
	  <listitem>
	    <para>window_move_scroll_timeout=5 (milliseconds)</para>
	    <para>Time to wait between move scroll events before redrawing</para>
	  </listitem>
	  <listitem>
	    <para>window_zoom_scroll_timeout=150 (milliseconds)</para>
	    <para>Time to wait between zoom scroll events before redrawing</para>
	  </listitem>
	  <listitem>
	    <para>window_pinch_gesture_factor=1.5</para>
	    <para>Sensitivity factor for pinch zooming. Best to use keep this value somewhere between 0.5 and 3.0 - a higher value is more sensitive.</para>
	  </listitem>
	  <listitem>
	    <para>version_check_period_days=14</para>
	  </listitem>
	  <listitem>
	    <para>trackwaypoint_start_end_distance_diff=100.0</para>
	  </listitem>
	  <listitem>
	    <para>gps_statusbar_format=GSA</para>
	    <para>This string is in the Message Format Code</para>
	  </listitem>
	  <listitem>
	    <para>geoclue_statusbar_format=SA</para>
	    <para>This string is in the Message Format Code</para>
	  </listitem>
	  <listitem>
	    <para>trkpt_selected_statusbar_format=KEATDN</para>
	    <para>This string is in the Message Format Code</para>
	  </listitem>
	  <listitem>
	    <para>utils_nearest_tz_factor=1.0</para>
	  </listitem>
	  <listitem>
	    <para>viewport_history_size=20</para>
	  </listitem>
	  <listitem>
	    <para>viewport_history_diff_dist=500</para>
	    <para>In metres.</para>
	    <para>
	      Go Back or Go Forward requests over this range from the last history location will move back to that position.
	      If within this range it will skip over this location and move on to the next saved history location.
	    </para>
	  </listitem>
	  <listitem>
	    <para>viewport_scale=1</para>
	    <para>
	      If Viking doesn't automatically detect a high resolution display, you can force the setting here - typically by setting this to 2.
	    </para>
	  </listitem>
	  <listitem>
	    <para>external_diary_program=<ulink url="https://rednotebook.sourceforge.io/">rednotebook</ulink></para>
	    <para>Or in Windows it uses <filename>C:/Progra~1/Rednotebook/rednotebook.exe</filename> - This string value must use Unix separators and not have spaces.</para>
	  </listitem>
	  <listitem>
	    <para>external_astro_program=<ulink url="https://stellarium.org/">stellarium</ulink></para>
	    <para>Or in Windows use <filename>C:/Progra~1/Stellarium/stellarium.exe</filename> - This string value must use Unix separators and not have spaces.
	          Needs to be version 0.15.0 or greater (otherwise due to this <ulink url="https://bugs.launchpad.net/stellarium/+bug/1410529">Bug</ulink> means this does not actually work).</para>
	  </listitem>
	  <listitem>
	    <para>external_text_program=<application>gedit</application></para>
	    <para>Or in Windows it uses <application>notepad</application> - This string value must use Unix separators and not have spaces.</para>
	  </listitem>
	  <listitem>
	    <para>bfilter_simplify=100</para>
	  </listitem>
	  <listitem>
	    <para>bfilter_compress=0.001</para>
	  </listitem>
	  <listitem>
	    <para>list_date_format=%Y-%m-%d %H:%M</para>
	    <para>A <ulink url="https://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html">date format description</ulink> as passed on to strftime().
	          Note that when displayed in tables sorting by this column simply uses the text value, rather than the underlying date/time value.
	    </para>
	  </listitem>
	  <listitem>
	    <para>export_device_path=OS Specific</para>
	    <para>UNIX = "/media/<emphasis role="italic">user</emphasis>/GARMIN/Garmin/GPX"</para>
	    <para>WINDOWS = ":/Garmin/GPX"</para>
	  </listitem>
	  <listitem>
	    <para>export_device_trackpoint_limit=10000 (Typical Garmin Edge limit)</para>
	    <para>Older Garmins limits are typically much lower - Etrex 20/30 is 500</para>
	  </listitem>
	  <listitem>
	    <para>export_device_routepoint_limit=250</para>
	  </listitem>
	  <listitem>
	    <para>kmz_default_maps_dir=<emphasis role="italic">Empty</emphasis></para>
	    <para>You may want to use something like: "/media/<emphasis role="italic">user</emphasis>/GARMIN/Garmin/CustomMaps"</para>
	  </listitem>
	  <listitem>
	    <para>geotag_photo_dir="/home/<emphasis role="italic">user</emphasis>/Pictures"</para>
	    <para>Override the base search location for photographs</para>
	    <para>A matching dated directory corresponding to the track is attempted of the format /geotag_photo_dir/YYYY/MM/DD</para>
	  </listitem>
	  <listitem>
	    <para>gpx_comment_time_format="%d-%B-%y %H:%M:%S"</para>
	    <para>The fallback format used in generating timestamps for waypoints from their comment</para>
	  </listitem>
	  <listitem>
	    <para>use_env_browser=false</para>
	    <para>By default &appname; uses the low level function gtk_show_uri_on_window() function to open URLs, which typically results in opening a new instance of a web browser.</para>
	    <para>This can be overridden by setting this configuration value to true and setting the environment variable <envar>BROWSER</envar> to invoke the desired browser, optionally including command line parameters to invoke the desired behaviour; such as "firefox --new-tab".</para>
	    <para>One could even have a more complicated string to run a specific version with a specific profile, e.g.
              <command>BROWSER="/home/rob/Downloads/firefox/firefox -P 'Nightly' --new-tab" viking</command>
            </para>
            <para>Note that if you set <envar>BROWSER</envar>, other programs may also use this value.</para>
	    <para>This is not applicable on Windows as currently &appname; uses the low level function ShellExecute() method to open URLs.</para>
	  </listitem>
	</itemizedlist>

	<section>
          <title>Message Format Code</title>
	  <para>Currently for ease of implementation the message format code is a string of characters.</para>
          <para>Each character represents what should be inserted in relation to a Trackpoint.</para>
	  <para>One day it might evolve into something more user friendly with a frontend to control it, perhaps allowing arbitrary text too. However for now at least some control is offered :)</para>
	  <para>
          <variablelist>
            <varlistentry>
              <term>Character Code</term>
              <listitem>
              <para>G = Some text to display at the start of the message - <emphasis>GPSD</emphasis></para>
              <para>K = Some text to display at the start of the message - <emphasis>Trkpt</emphasis></para>
              <para>A = Altitude of a Trackpoint</para>
              <para>S = Speed of a Trackpoint</para>
              <para>B = Vertical Speed (Climb)</para>
              <para>C = Course of a Trackpoint</para>
              <para>L = Location of a Trackpoint</para>
              <para>T = Time of a Trackpoint</para>
              <para>M = Time diff of a Trackpoint from the previous trackpoint</para>
              <para>X = Number of satellites used in the trackpoint fix</para>
              <para>D = Distance of the trackpoint from the start of a track (following along the track)</para>
              <para>F = Distance of the trackpoint from the finish (end) of a track (following along the track)</para>
              <para>P = Distance difference of the trackpoint from the previous trackpoint</para>
              <para>N = Name of track to which the trackpoint belongs</para>
              <para>E = Name of the trackpoint</para>
	      </listitem>
            </varlistentry>
            <varlistentry>
              <term>Output Notes</term>
              <listitem>
	      <para>If the output has <emphasis>*</emphasis> after it, then the value has been calculated via interpolation (such as speed when the Trackpoint does not contain a speed value).</para>
	      <para>If the output has <emphasis>**</emphasis> after it, then difficulties were encountered in trying to work out the value so probably a default of 0 will be shown.</para>
	      </listitem>
            </varlistentry>
          </variablelist>
	  </para>
	</section>

      </section>

    <section id="config_keys" xreflabel="Keyboard Shortcuts File">
      <title>Keyboard Shortcuts (Accelerator) Settings</title>
      <para>This is held in the file <filename>keys.rc</filename> in your <xref linkend="config_file_loc"/>.</para>
      <para>It is in the standard GTK Accelerator map format. Values are automatically read in and saved between &app; sessions.</para>
      <para>This file is not intended to be manually edited, but since it is a plain text file it can be changed if desired.</para>
    </section>

</section>
<!-- End of Extending Viking -->

<xi:include href="recommends.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

<xi:include href="commandline.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

<xi:include href="attribution.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

</article>
