# &app; Manual

## Introduction

&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:

- Uploading and downloading waypoints, tracks to/from GPS.

- Preparing tracks and waypoints for trips using maps from services such as OpenStreetMap (OSM) and/or Terrasever. The data is only needed to be uploaded to your GPS before you leave. The maps together with your tracks and waypoints can also be printed and used during the trip.

- After trips, tracks and waypoints from GPS can be downloaded, stored, managed and reused in your (or your friends') later trips.

- Analyzing Off Highway Vehicle (OHV) and hiking trips, understanding where you went and how far you were from something.

- Making waypoints and tracks to follow to easily get someplace you've never been before or don't have GPS data for but online maps exist for it.

- Making maps with coordinate lines.

- Grouping data from multiple trips using a hierarchical data manager.

- Analyzing speed at different places (to some degree), adding waypoints where you forgot to mark one but did slow down or stop.

- Downloading and storing OpenStreetMap and/or Terraserver maps on your hard drive and looking at them later.

- Editing tracks and trackpoints, joining and splitting up tracks

- Show the live GPS position on the map (for use on a mobile device - e.g. a laptop)

- Import track+waypoint files of various types via GPSBabel

- View, create and update Geotagged Images (using EXIF data).

&appname; is under continual improvement: see the potential areas in the Roadmap / Wishlist:

## General Concepts

### Layers

'Layers' is concept one may know from powerful graphics editors such as Photoshop or GIMP. Instead of putting all the data on the same level, it is stacked (i.e. layered) with different data over one another. This can make useful for analysis and general handling of various sets of data.

Unfortunately the downside of this complexity is remembering how differing layers of data can obscure other data.

The Map layers have Alpha Compositing, to create the appearance of partial transparency. By controlling this value one can see data below it in the layer heirarchy for interesting effects.

### Layers Panel

The panel on the left is called the layers panel. It determines which layers and sublayers (such as tracks and waypoints) are shown, and the order in which they are drawn. Layers list on the top of the layers panel 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.

### Viewport

The main &appname; area where the layer data is drawn, is called the viewport.

### Statusbar

This provides a readout of various information:

- The currently selected (mouse pointer) tool

- The number of items to process in the background - normally this the number in the map tile download queue

- The zoom factor

- The location of the mouse pointer (and potentially height information if DEM data is available)

### Projections

&appname; supports differents projections:

- UTM

- LatLon (also called EPSG:4326)

- Mercator (also called Spherical Mercator)

## Layers

Layers supported by &appname; are:

- Aggregate

- TrackWaypoint

- GPS

- DEM

- Coord

- Map

- GeoRef

For each layer there are a few standard options:

- Properties - Layer setup / configuration settings

- Cut

- Copy

- Paste

- Delete

- Visibility - This checkbox on the Layers Panel controls whether the layer is shown in the viewport or not

The cut/copy/paste options can be accessed in a variety of ways once the layer has been selected:

- Standard keys: Ctrl+x|c|v

- Main menu Edit

- From the right click menu

- Buttons at the bottom of the Layers Panel

See the individual section for detail about each layer.

### TrackWaypoint Layer

TrackWaypoint layers display GPS data (tracks and waypoints).

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.

By right-clicking tracks and waypoints in the layers panel, you can do many things with tracks and waypoints. You can easily find a specific track or waypoint by expanding the Tracks or Waypoints sublayers in the layers panel to show all tracks or waypoints, and typing the name of the track/waypoint.

#### Layer Operations

The layer has a context menu with several operations.

##### View Layer

Version1.1+: This will automatically move the viewport and select the best zoom level to see the whole layer (i.e. tracks and waypoints).

##### View All Tracks

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 waypoints).

##### View All Waypoints

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

##### Goto Center of Layer

This will automatically move the viewport to see the whole layer (i.e. tracks and waypoints). It does not adjust the zoom level.

##### Goto Waypoint

This opens a dialog box to enter a name of waypoint to search for. If it is found the viewport is centred on it.

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.

##### Export Layer

The layer (all tracks and waypoints) can be exported to a file GPX, GPSPoint, GPSMapper or Google's KML format.

Version1.1+: An individual track can be exported to a GPX file via the track menu.

##### New Waypoint

This opens a dialog box to create a new waypoint. A default name will be suggested and the default position is the center of the viewport.

##### Add Wikipedia Waypoints

This gets 'interesting' points from Wikipedia for the specified view: either within the extent of layer bounds or within the current viewport boundary.

##### Geotag Images

This starts the Geotagging Images dialog against all tracks in the layer. See Geotagging for further detail.

##### Upload To OSM

This opens a dialog to upload all tracks and waypoints to OpenStreetMap traces. Useful if you are an OpenStreetMap contributor (you will need an OpenStreetMap account), these details can be stored in &appname; preferences.

&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.

Warning! The password is transferred unencrypted in every request sent to the OpenStreetMap server. This is due to the use of OpenStreetMap's basic authentication method.

Currently &appname; does not support the OAuth mechanism.

##### Filter

###### Simplify All Tracks

This opens dialog to request the number of points each track will be simplified using GPSBabel. 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.

###### Remove Duplicate Waypoints

Remove Duplicate Waypoints - fairly self explainatory, with the results created in a new layer.

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.

##### Filter With Trackname

This runs GPSBabel on the layer using information from a previously selected track (select via the track menu "Use With Filter" option) with the following command types:

- Waypoints Inside This

- Waypoints Outside This

The result is generated in a new Track/Waypoint layer.

##### Geotag Images

This starts the Geotagging Images dialog using the specific track. See Geotagging for further detail.

#### Track Properties

Show many useful statistics about a track, including a elevation-distance graph and a speed-time graph (if data is available). You can click these graphs to jump to the point in the track. You can also reverse a track, delete duplicates, and split a track from its component segments (discontinuous breaks in a track) into separate tracks.

The following colors are used in the elevation-distance graph:

'Main' colour - this is dependent on your Desktop theme - often blue by default

- elevation data in graph

Yellow

- no elevation data

Green

- elevation data from DEM

Red

- speed

#### Track Operations

##### Goto

This centers the viewport on the selected position on the track:

- Startpoint

- "Center" - the notional center from the bounds of the track

- Endpoint

- Version1.1+: Highest Altitude

- Version1.1+: Lowest Altitude

- Version1.1+: Maximum Speed

##### View

Version1.1+: This centers the viewport on the track and selects the best zoom level to see it.

##### Merge By Time

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.

##### Merge With Other Tracks

This opens a dialog listing the other tracks in the same TrackWaypoint layer, from which one can select the other tracks to merge with.

##### Split By Time

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.

##### Split By Number of Points

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.

##### Apply DEM data

If any DEM data is loaded, this will apply the DEM data to give the track elevation data.

##### Export Track as GPX

Version1.1+: This allows exporting the track as a GPX file by opening a file save dialog.

##### Extend Track End

Changes the current tool to add trackpoints to the end of the track.

##### Extend Using Route Finder

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 Google's route service and applied to the track.

##### Upload to OSM

Same as the layer Upload to OSM, but only applies to the track.

##### Use With Filter

This selects the track to be used in the Filter With Trackname feature.

##### View Google Directions

This option is only available on a track created using the Route Finder tool.

Launch a web browser to see the Google directions page which yielded the route.

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.

#### Waypoint Properties

This shows a dialog with detailed information for the waypoint. Many properties of the waypoint can changed here, such as the comment, the symbol used in drawing or the image (normally a photograph taken at this position) assiocated 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).

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.

#### Waypoint Operations

##### Goto

This centers the viewport on the selected waypoint.

##### Visit Geocache Webpage

If the waypoint's name is in Geocache form (GCXXXXX) you can launch a web browser to go to the Geocache page.

##### New Waypoint

Same as the layer New Waypoint.

#### Version1.3+: Geotag Images

This dialog allows geotagging images (normally taken with a digital camera) via interpolation against a specific track or all tracks in the TrackWaypoint layer - depending on how it is invoked.

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.

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.

Various options allow control of how the geotagging process is performed:

- Images - Add the images used for geotagging

- Create Waypoints

- Write EXIF

- Overwrite Existing GPS Information

- Interpolate Between Track Segments

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

- Image Timezone - The timezone that the used when the images were created. For example, if a camera is set to AWST or +8:00 hours. Enter +8:00 here so that the correct adjustment to the images' time can be made. GPS data is always in UTC.

### GPS Layer

The GPS layer is responsible for uploading and downloading GPS data from a GPS device. It also is responsible for realtime GPS tracking. Expand the GPS layer in the layers panel to see the two TrackWaypoint layers it uses for uploading and downloading. To upload, download, or use realtime tracking, right-click the GPS layer and click the appropiate menu item.

#### Download

To download data from the GPS, right-click the GPS layer and click Download from GPS.

#### Upload

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

#### Realtime Tracking

You must set up gpsd correctly or use a GPSD server and put the correct information in the GPS layer properties dialog. Then right-click the layer and select Start Realtime Tracking.

#### Empty Item

There are several options to quickly delete a subsection of data:

- Empty Realtime

- Empty Upload

- Empty Download

- Empty All

### DEM (Digital Elevation Model) Layer

This layer provides elevation data from the Shuttle Radar Topography Mission (SRTM)

Elevation data can be useful in planning trips, as you many wish to avoid/minimise the hills encountered. [OSM Cyclemap is also useful this way too]

To download the data use the DEM Download tool (shown on the toolbar), and then click on a area of the viewport. Once files have been downloaded they can then be loaded from disk via the DEM properties in future application runs.

The current data server is: NASA STRM 2.1.

ATM &appname; does not auto download DEM data. If you want to get lots of data blocks, you may wish to use some other program get such as curl or wget to download them for an area.

Using many DEMs is CPU/memory intensive. Depending on your computer's capability, &appname; will be less responsive when about 50+ DEM blocks are loaded. It is probably unwise to attempt using 200+ blocks, so trying to use DEMs covering large countries/continents (USA, Australia etc...) is unlikely to work. In these conditions under Linux, &appname; may be automatically stopped by the "OOM Killer"

### Maps Layer

This layer provides a single map resource, you may have multiple map layers but only top one (if enabled) will be visible. You will need an open internet connection when you are downloading maps, but once downloaded they are available from the hard disk cache. When map are avaliable from the disk cache it is much faster and can be used offline.

Some maps are continually improving over time (e.g. OpenStreetMap) and so in order to not to have to (re)download the data all the time &appname; employs a timeout method - 'Tile Age' to determine whether to access the server. However a forced refresh for the current view can be made via the Reload All Onscreen Maps option.

Inbuilt maps include various Terraserver (Primarily USA coverage) and OpenStreetMap (OSM) ones and more:

- Bing Bird's Eye (Aerial) Maps (&appname; Version1.2+)

- Terraserver Topos

- Terraserver Aerials

- Terraserver Urban Areas

- OpenStreetMap (Mapquest) - This is the default (&appname; Version1.3+)

- OpenStreetMap (Mapnik)

- OpenStreetMap (Cycle)

- OpenStreetMap (Transport) (&appname; Version1.3+)

- NASA BlueMarble

- SpotMap (&appname; Version1.1+)

&appname; can be configured to handle additional maps. See Extending &appname; for further detail.

#### Layer Operations

##### Download Missing Onscreen Maps

This requests map tiles for areas of the viewport that do not currently have one.

##### Download New Onscreen Maps

This requests map tiles only if the maps are older than the Tile Age preference.

##### Reload All Onscreen Maps

Force a refresh of all visible map tiles.

### Aggregrate Layer

This layer is a container layer to hold other layers. There is always an initial and controlling 'Top Layer' that can not be removed, although it can be renamed.

This layer type is useful for grouping other layers, especially TrackWaypoint layers, in whatever categories are relevant to you: such as by activity, location or date. Here are some suggestions:

- Hiking

- Mountain Biking

- Road Cycling

- Car Trips

- Sailing

- Holidays

- UK Points of Interest

- USA Points of Interest

- etc...

Thus one can have a list of all your tracks, but groups can be shown or not using the relevant layers visibility checkbox.

This layer only has one operation: New Layer

#### New Layer

Add a new layer of the selected type.

### GeoRef Layer

This layer allows one to use any image as a map. You will need to tell it how to align the map to a position in the world and the scale of map.

#### Layer Operations

##### Zoom to Fit Map

Automatically set a zoom level to see the entire map coverage.

##### Goto Map Center

Center the viewport on this map.

##### Export to World File

Opens a file save dialog to save the scale and position information as a World File.

### Coord Layer

This layer is allows drawing of grid lines on the viewport.

## Tools

You can use the scroll wheel and the right-click to zoom and pan no matter what tool you are using.

Scroll: zoom in and out without changing the center (also Ctrl+, Ctrl- [*not* KeyPad +/-])

Ctrl-scroll: pan north-south (also Ctrl-up, Ctrl-down)

Shift-scroll: pan east-west (also Ctrl-left, Ctrl-right)

Ctrl-shift-scroll: zoom in and out, keeping mouse over same location (like Google maps)

Left or Middle-click: make the clicked point on the map the center

Middle-click and drag: pan

### Pan

Pan moves the viewpoint. A single click centers the viewport at that point, whereas click and drag dynamically moves the view around. This is the default tool.

### Zoom

Zooms in and out on the clicked part of the map.

### Ruler

The ruler is used to measure 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 'freeze' the ruler at that point.

### Version1.1+: Select

The select tool allows one to choose any waypoint or track by clicking on it (or reasonably near) in the viewpoint.

ATM to select a track one must actually click on a trackpoint, which is also selected.

### TrackWaypoint Layer Tools

You must have a TrackWaypoint Layer selected to use these tools.

#### Create Waypoint

Left click will open the new waypoint dialog using the specified position.

#### Create/Begin Track

Left click to create a new trackpoint. If it's the initial trackpoint you will be asked to enter a name for the track. If Ctrl is held at the same time, it will jump the new trackpoint position to a nearby existing trackpoint. Right click or Backspace: undo one point.

Double click or Escape: finish track creation.

#### Edit Waypoint

Left Click/drag: select/move a waypoint. If Ctrl is held at the same time, it will jump the waypoint position to a nearby existing trackpoint. If Shift is held at the same time, it will jump the waypoint position to a nearby existing waypoint.

Right-click on waypoint: opens a menu with waypoint actions (the same menu accessed by right-clicking the waypoint in the layers panel)

#### Edit Trackpoint

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 Ctrl is held at the same time, it will jump the new trackpoint position to a nearby existing trackpoint.

Options in the Track Point Edit dialog include: change position, go to next, go to previous, delete, insert (halfway to next trackpoint) and splitting the track.

#### Show Picture

Opens an image viewer with the picture associated with the waypoint. On Linux this uses eog. On Windows this uses the default system image viewer.

#### Route Finder

Creates a track using Google maps routing between two points. Requires an internet connection. Click one point, then click another to create a track.

Right-click: undo last routing (only track removed - not any waypoints)

Ctrl: continue previous track

### Georef Map Layer Tools

You must have a Georef Map Layer selected to use these tools.

#### Georef zoom

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.

#### Georef move

Drag to move the georeferenced map.

### Map Download

You must have a Map Layer selected to use this.

Click to download a single tile. Drag to download tiles in the dragged rectangle area.

Right-click to redownload bad/all tiles. Right-click and drag to redownload bad/all tiles in the dragged rectangle area.

### DEM Download

You must have a DEM Layer selected to use this.

Click to download and import a DEM file.

### Webtools

Many services are available only via a web browser (Google Maps, OpenStreetMap Potlach editor, etc.).

Jumping from &app; to such service can become annoying.

&appname; allows you to open such service directly at the position currently viewed in &app;.

This feature is called Webtools. It is also known as External Tools.

## Preferences

### General

#### Localisation

You can select units displayed by &appname; to best fit your usage.

##### Properties dialog: units part

Concerning degrees, you can select the way to display them:

DDD

- decimal degree

DDD

- partial sexagesimal display: degrees, minutes and décimal part of minutes

DMS

- sexagesimal display: degrees, minutes and seconds

##### Properties dialog: degree display options

#### Waypoint Icon Size

An option exists to control the icon (symbol) size used for waypoints

#### 'Home' Default Location: Latitude and Longitude

You can set the 'Home' location directly by inputting the latitude and longitude in decimal degrees.

#### Tile's age

This age is used to decided wether or not a new request to tile server must be done.

Changing this value, you will increase or decrese the network load.

#### Default maplayer directory

This property sets the default directory of the tiles cache. This value is used when you create a new map layer.

You are still able to change this value in each map layer properties.

#### Map Cache Memory Size

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.

### Export/External

#### KML Export Units

Allows setting the units used when saved as the KML file type, such as Metric or Statue units

#### Image Viewer (Not Windows)

Allows setting the program used to view images associated with Waypoints.

By default this is set to 'xdg-open' which should open the system's default image viewer, however this can be overridden with this setting.

Note: for Windows systems, viewing images associated with Waypoints always uses the system's default image viewer.

#### External GPX programs

Allows setting the programs invoked via the TrackWaypoint Layer -> Export Layer -> Open With 'program'

Two options are given so that it can be configured for various uses such as:

- An OSM editor (default)

- Some other user defined program

### OpenStreetMap Traces

#### OSM Username + Password

Store your OSM details here, so that you don't need to enter it in every time in the Upload to OSM procedure.

Your OSM password will be stored in plain text.

## Mini-Howto's

### Getting Started

To quickly get started using &appname;, follow these instructions.

#### Go to an area of interest

&appname;'s default location is a Manhatten, New York, USA, so you may need to pick another place that interests you.

#### Method A

1. Use View - Go to to move to a coordinate of interest.

#### Method B

1. Use the GPS Layer or File Acquire From GPS to load data directly from your GPS into &appname;. Currently Garmin, Magellan, DeLorme and Navilink protocols are supported.

   You must have write permission to the port used. For Unix like OS:

   /dev/ttyS0 is the first serial port

   /dev/ttyUSB0 is the first USB port

   For DeLorme device support you will need GPSBabel v1.4.0+ installed

#### Method C

1. Get data from files in GPX or KML format, which can be opened directly. Use File Open

   Other formats can be imported that are supported by GPSBabel. File Acquire Import File With GPSBabel...

2. Expand Tracks or Waypoints. Right-click on the track or waypoint of interest and select Goto "Center".

#### Add a map layer

1. Use Layers - New Map Layer, and choose a suitable cache directory where you would like to store your tracks and click OK. 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 Tools - Map Download, Click where you would like to download a map. Regardless of what tool you are using, the middle mouse button always pans.

You need an open internet connection when you are downloading maps.

1. You will notice the maps are being drawn on top of the tracks, which is probably not what you want. Look at the Layers Panel to the left. Notice how the layer named Map is ABOVE your TrackWaypoint layer that your GPS data is in. This means that it will be drawn last, or on top of the other layers. Select the Map layer from the list and click the down arrow button beneath the list. Your tracks will now be drawn over the map.

### From 1st startup to GPS track (including offline maps)

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: View Go to Location, enter 'Stuttgart'.

#### Fetching the maps

Map

1. Layers New Map Layer

2. in the layer properties dialogue choose e.g. OpenStreetMap (Mapnik).

3. For the moment, we keep the default Maps Directory (the directory in which the maps will be stored and can be used for offline usage).

4. Check Autodownload maps and keep the zoom level as Use Viking Zoom Level.

   however, that these settings will play an important role in the pre-fetch for offline usage discussed later

You'll see a map of Stuttgart. Using the mouse wheel, you can zoom in and out. The maps for the choosen resoltion will be downloaded automatically.

DEM Layer (Height Map)

1. Zoom out to 512.

2. Layers New DEM Layer

3. Keep the download source as is (SRTM Global 90m), hit OK.

In the layer listing on the left, the DEM layer should reside above the map layer. If this is not the case, highlight the DEM layer an shift it one up (using the arrow up button).

1. highlight the DEM layer in the layer listing on the left

2. in the toolbar, check DEM layer download/import (the last symbol)

3. a left-click in the map window should then fetch the DEM data

This might take some time.

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.

     right-click the DEM layer properties

The DEM Files listing allows you to delete the specific tiles (alternatively do this from the command line).

You can also alter the Min. and Max. elevation in this dialogue.

#### GPS Track with Height Profile

1. uncheck the DEM layer (the map show up again)

2. Layers New TrackWaypoint Layer

Ensure the new track layer is above the map layer.

1. expand trackwaypointlayer, select Tracks

2. in the tools menu choose Begin Track which looks like this:

   ##### Begin Track Icon

3. leftclick in the map window, enter a name

4. click several times to generate a track (a right-click removes the last point)

5. expand tracks in the layer menu, your track should show up, select it

6. right click your track, select Apply DEM data

7. right click your track again, select Properies

8. click the tab Elevation-distance - enjoy the plot

In order to save this setting for later usage

1. click OK in the Track Properties dialog

2. File Save As, choose a name (you can open this view later via file Open).

#### Usecase: offline data for holiday

Suppose you want to have the map and DEM data offline for your holiday in Italy near Bologna.

1. Start a new &appname; session.

2. View Go to Location, enter Bologna

3. Layers New Map Layer

4. Choose e.g. OpenStreetMap (mapnik).

5. adapt the maps directory e.g. to `/home/user/.viking-map-holiday/`. This allows you to delete the map stuff after holiday without purging the rest of your maps.

6. check autodownload map

7. keep viking zoom level

8. zoom out to 1024

9. add a DEM layer (as discussed above)

10. download the DEM data

In the &app; version discussed here, the DEM data automatically are stored in `/home/user/.viking-maps/`. You can move the corresponding tiles into `.viking-map-holiday/` if you like.

Download map data for all zoom levels

1. uncheck the DEM layer for the map to show up

2. navigate the map to be centered at Bologna

3. choose the zoom such, that all regions of interest are displayed in the map window (e.g. 1024)

4. follow this sequence until you have all tiles for all zoom levels you need

   1. right-click the map layer properties

   2. set the zoomlevel explicitely one below the last (in the first cycle 512), hit OK

   3. right click the map layer Download Missing Onscreen Maps

   4. wait until all tiles for that resolution have been downloaded

This may take some time and hd capacity. Lixus wrote a set of scripts which allow to download the map tiles for several zoom-level in parallel from the command line.

Do not forget to save your configuration (as discussed above).

### OpenStreetMap project

OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. One of sources of data for this project is GPS tracks. &appname; supports this project via the GPS Traces methods, both uploading and downloading such data.

#### Uploading data to OpenStreetMap

It is possible to upload data directly from &appname; to OpenStreetMap.

#### Upload a layer

One solution is to upload whole a TrackWaypoint layer. To do this, simply select the layer and right click on it. Then, select Upload to OSM.

#### Upload a single track

One solution is to upload whole a TrackWaypoint layer. To do this, simply select the layer and right click on it. Then, select Upload to OSM.

#### Fill in the form

In both cases, &appname; will retain some information. The email field is the email you used to subscribed into OpenStreetMap. The password field is the password you used with this account. 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 separated list of tag.

#### Downloading traces from OpenStreetMap

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.

#### Download all visible tracks

One solution is to select File Acquire OSM traces... . 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 'Page Numbers' which start at 0. Increasing the page number parameter allows one to request the subsequent sets of point groups. See for further detail.

### Extending Viking

Currently, &app; has some extention 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` for UNIX like systems and `C:\Documents and Settings\`username`\.viking\maps.xml` on Windows XP.

An example of the file is in the distribution `doc/examples/maps.xml`. Further examples and values are online in the Maps Wiki

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

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 X, Y and Z (zoom level) (eg. "/%d/%d/%d.png")

The VikTmsMapSource allows to declare any TMS service. It supports the following properties:

id

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

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 X, Y and Z (zoom level) (eg. "/%d/%d/%d.png")

The VikWmscMapSource allows to declare any WMS or WMS-C service. It supports the following properties:

id

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

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 4 "%s" fields for bounding box coordinates (eg. "/coord=%s,%s,%s,%s")

#### 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`.

#### Webtools

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`.

Currently, there is a single object class available: VikWebtoolCenter. Such feature allows to declare any Webtool using a logic based on center coordinates and zoom level value.

The related properties are:

id

- this is an integer and should be unique as it used to identify the tool

label

- the text displayed in the menu entry

url

- the parametrized address of the tile, in the spirit of C printf format, with 3 "%d" fields for X, Y and Z (zoom level) (eg. "http://hostname/%d/%d/%d.png")

### What to Do if &appname; Does Not Seem to Work

In order to get some information about what &appname; is doing, start it in verbose debug mode via the command line:

    viking -dV

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:

    ** (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

Or for OSM Mapnik tile server:

    * 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

## Dependencies

## gpsbabel

&appname; uses GPSBabel to convert data.

## unbuffer (optional)

&appname; uses unbuffer command to optimize conversion calls.