viking(1) program to manage GPS data

SYNOPSIS

viking [-d | --debug] [-V | --verbose]
[--latitude degrees] [--longitude degrees]
[-z | --zoom ZoomLevelOSM] [-m | --map MapId]
[file...]
viking [-h | --help]
viking [-v | --version]

DESCRIPTION

Viking is a program to manage GPS data.

You can import and plot tracks, routes and waypoints, show OpenStreetMap (OSM) and/or other maps, generate maps (using Mapnik), geotag images, add coordinate lines, make new tracks, routes and waypoints, hide different things, etc. It is written mainly in C with some C++ and uses the GTK+ 2 toolkit. It is available for Linux, other POSIX operating systems and Windows.

Homepage: m[blue]http://viking.sf.netm[]

Viking is licensed under the GNU GPL.

OPTIONS

file

Specify file to load at start.

-d, --debug

Enable debug output.

-V, --verbose

Enable verbose output.

-?, --help

Show help options.

-v, --version

Show version.

--latitude

Set the initial position to the specified latitude in decimal degrees.

--longitude

Set the initial position to the specified longitude in decimal degrees.

-z, --zoom

Set the initial zoom level. The value is the OSM zoom level (0 - 22).

-m, --map

Add a map layer by specifying the map id. The value needs to match one of the internal ids or an id from the maps configuration extension (see below). Specifying a value of 0 will use the configured map layer default.

Internal Map Ids:

OSM Mapnik = 13

OSM Cycle = 17

Mapquest OSM = 19

EXTENDING VIKING

Currently, viking 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".

Here is an example:

<objects>
  <object class="ClassName">
    <property name="property_name1">Property value</property>
    <property name="property_name2">Property value</property>
  </object>
  ...
<objects>

You can find more examples in the documentation part of the distribution.

Map Source. It is possible to add new map's sources. The file is ~/.viking/maps.xml. An example of the file in the distribution doc/examples/maps.xml. The VikSlippyMapSource allows to declare any map's source working like OpenStreetMap. It supports the following properties:

id

this is an integer and should be unique as it used to identify the map source

name

a string (should be unique) that is used for the OSM style cache directory name when the Map Cache directory is the default (~/.viking-maps)

label

the text displayed in the map's source selection dialog

hostname

the server's hostname (eg. "tile.openstreetmap.org")

url

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")

zoom-min (optional)

The minimum zoom value supported by the tile server. The Default is 0 if not specified.

zoom-max (optional)

The maximum zoom value supported by the tile server. The Default is 18 if not specified.

See m[blue]Zoom Levelsm[][1]

lat-min (optional)

The minimum latitude value in degrees supported by the tile server. The Default is -90 degrees if not specified.

lat-max (optional)

The maximum latitude value in degrees supported by the tile server. The Default is 90 degrees if not specified.

lon-min (optional)

The minimum longitude value in degrees supported by the tile server. The Default is -180 degrees if not specified.

lon-max (optional)

The maximum longitude value in degrees supported by the tile server. The Default is 180 degrees if not specified.

file-extension (optional)

The file extension of the files on disk. The default is .png

If the tile source URL ends in something other than .png, then this parameter will need to match it.

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 .png.tile


Note
The file types actually usable are those supported by GDK Pixbuf Library, which includes at least PNG and JPEG.


Note
Remember to include the beginning '.' when specifying this parameter.

switch-xy (optional)

Swap the X,Y values around in the URL parametrized ordering.

The default is false.

check-file-server-time (optional)

Sends the timestamp of the tile to the server, so the server can decide whether it should send a new tile or not.

The default is false.

use-etag (optional)

Use and compare the m[blue]ETagm[][2] value in determining whether to download a newer tile. The default is false.

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.

The VikTmsMapSource allows to declare any TMS service. It supports the following properties (as per VikSlippyMapSource above):

id

label

hostname

url

check-file-server-time (optional)

zoom-min (optional)

zoom-max (optional)

lat-min (optional)

lat-max (optional)

lon-min (optional)

lon-max (optional)

The VikWmscMapSource allows to declare any WMS or WMS-C service. It supports the following properties (as per VikSlippyMapSource above):

id

label

hostname

url

check-file-server-time (optional)

zoom-min (optional)

zoom-max (optional)

lat-min (optional)

lat-max (optional)

lon-min (optional)

lon-max (optional)

Go-to search engines. It is possible to add new new search engines for the "Go-To" feature. The file is ~/.viking/goto_tools.xml. An example of the file in the distribution doc/examples/goto_tools.xml. Currently, there is a single object class available: VikGotoXmlTool. Such feature allows to declare any search engine using a XML format as result. The related properties are:

label

the text displayed in the Go-To dialog

url-format

the parametrized address of the query, in the spirit of C printf format, with a single "%s" field (replaced by the query string)

lat-path

XML path of the latitude (eg. /root/parent/elem)

lat-attr (optional)

name of the attribute (of previous element) containing the latitude

lon-path

XML path of the longitude (eg. /root/parent/elem)

lon-attr (optional)

name of the attribute (of previous element) containing the longiude
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: /root/parent/elem@attribute.

External tools. It is possible to add new external tools. The file is ~/.viking/external_tools.xml. An example of the file in the distribution doc/examples/external_tools.xml. The VikWebtoolCenter allows to declare any Webtool using a logic based on center coordinates and zoom level value. The related properties are:

label

the text displayed in the menu entry

url

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&lon=%s&zoom=%d")
The VikWebtoolBounds allows to declare any Webtool using a logic based on bounds coordinates. The related properties are:

label

the text displayed in the menu entry

url

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&right=%s&bottom=%s&top=%s")

Remote File Datasources. It is possible to add web references expected to return a file which can then be opened directly or converted via GPSBabel. The file is ~/.viking/datasources.xml. An example of the file is in the source distribution doc/examples/datasources.xml. The VikWebtoolDatasource allows to declare any URL using logic based on coordinates. The related properties are:

label

the text displayed in the menu entry

url

the parametrized URL to open in the spirit of C printf format, with up to 7 "%s" values. e.g. http://hostname/getfile?lat=%s&lon=%s

The order and meaning of these parameters is given by the url_format_code below

url_format_code

A string describing the parametrized URL substitution parameters, each character represents how to translate each term.

B = Bottom of the current view i.e. minimum latitude

L = Left of the current view i.e. minimum longitude

T = Top of the current view i.e. maximum latitude

R = Right of the current view i.e. maximum longitude

A = center lAtitude of the current view

O = center lOngitude of the current view

Z = OSM Zoom value of the current view. See m[blue]Zoom Levelsm[][1]

S = A user specified input string requested from the user via a dialog box

Thus for the url example above then the format code should be AO

file_type

This value is passed on for the -i parameter in interfacing with GPSBabel.

If it is not defined then the returned file is interpreted internally as a GPX file.

Possible values such as 'kml', 'mapsource' etc.. can be used. See m[blue]GPSBabel File Formatsm[][3] for the full list.

babel_filter_args

This value is passed on for the filter arguments interfacing with GPSBabel.

E.g. "-x nuketypes,routes" can be used to filter all routes from the results.

input_label

This value is used when requesting input from the user.

It is the label of the text input box.

FILES

~/.viking/maps.xml

File containing definition of map sources.

See previous section for details.

~/.viking/goto_tools.xml

File containing definition of "Go-to" services.

See previous section for details.

~/.viking/external_tools.xml

File containing definition of external tools.

See previous section for details.

~/.viking/datasources.xml

File containing definition of remote file datasources.

See previous section for details.

~/.viking/viking.prefs

Preferences for viking.

~/.viking/viking_layer_defaults.ini

Layer default values for viking.

~/.viking/viking.ini

Values for viking automatically saved between sessions.

Not generally intended to be manually edited.

However some finer control of default internal values can be set.

~/.viking/keys.rc

File containing short cut key accelerators.

This is in the standard GTK Accelerator map format.

~/.viking/cookies.txt

File hosting cookies used by viking.

~/.viking-maps/

Default location of the map cache of tiles downloaded or created by viking.

Extension files (maps.xml, goto_tools.xml, datasources.xml, external_tools.xml) are also searched in /etc/viking and /usr/share/viking directories (or related in your system).

ENVIRONMENT

XDG_DATA_HOME

Optional directory to look for extension files (maps.xml, goto_tools.xml, external_tools.xml).

XDG_DATA_DIRS

Path used to change the directories scanned for extension files (maps.xml, goto_tools.xml, external_tools.xml).

AUTHOR

This manual page was originally written by Ralf Meyer <[email protected]> for the Debian(TM) system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.

COPYRIGHT


Copyright © 2007 Ralf Meyer
Copyright © 2010 Guilhem Bonnefille
Copyright © 2013 Rob Norris