This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Feature: Reviews

Display your geolocation data with Viking

By Ben Martin on September 04, 2008 (9:00:00 AM)

Share    Print    Comments   

Viking is an open source application that allows you to import and edit your Global Positioning System (GPS) points of interest and tracks. It can overlay the points and tracks on your choice of Google Maps, Terraserver, OpenStreetMap, or NASA's BlueMarble map tiles so you can see what you are doing.

Viking is available as a 1-Click install for openSUSE 11 and Fedora 9, and is packaged for Ubuntu Hardy. I built Viking 0.9.6 from source on an i386 Fedora 9 machine. Although the requirements page does not mention it, the configure step will fail if libgps is not installed. The fatal configure message informs you that you can get around this by passing --disable-realtime-gps-tracking when invoking configure if you are willing to do without GPS tracking.

libgps is packaged either by itself or as part of the gpsd package, depending on your distribution. For Ubuntu Hardy use libgps-dev, for openSUSE 11 the library is part of gps-devel, and for Fedora 9 it is in the standard repository as gpsd-devel. Once you either have the development package for libgps installed or have disabled it in configure then you can complete the build with the normal make; sudo make install process.

Viking's main interface contains a tree describing your layers and their contents on the left side and a map view in the center and right part of the window. Layers that appear at the top of the left tree view are drawn last in the map. Layers displaying tracks and waypoints will always be drawn above layers that show map data regardless of where the track and waypoint layer is in the stacking order. If you do not want to see your tracks or waypoints, you can hide them using the layer tree on the left side of the window.

Right-clicking a map layer will let you change its data source or the alpha value for the layer, allowing you to make the map partially transparent. You can also say whether the maps for that layer should be automatically downloaded as you scroll around and zoom the main map view in Viking. If you are not using automatic tile downloading, you have to right-click on a map layer and select Download Onscreen Maps to explicitly tell Viking to download that layer for the current location and zoom level. You can also download the current view's tiles again by right-clicking a map layer and selecting Refresh Onscreen Tiles.

Once you have a Map Layer, you can select Go To Google Maps Location from the View menu to manually center your view on a point of interest. The three core methods of interacting with the map view are shown in the middle of the toolbar at the top of the window. These are the Pan, Zoom, and Ruler tools. Panning lets you grab the map and drag it around. The Zoom tool lets you click on the map to zoom in to the location you clicked on, or right-click on the map to zoom out. At any point you can use the Control-plus and Control-minus hotkeys to zoom in and out respectively. The Ruler tool places a compass around the first point you click on, then tracks the mouse as it moves until you click on a second point. While the Ruler tool is tracking the mouse (before you click for the second time), both the distance and angle from the first point are continually shown. If you click the left mouse button to start the Ruler tool tracking, you can click the right mouse button to recenter the view while the Ruler tool is still tracking. This right-click to recenter while using the Ruler feature is handy if the point you want to measure to is just off the edge of the screen.

Viking supports many layer types in addition to the map and waypoint ones mentioned above. You can create an Aggregate layer, which allows you to group any other layers under a new aggregate "parent" layer. By using an aggregate layer you can show and hide many layers at once by hiding the parent of a group of layers.

You can also create a Coord layer, which allows overlays a grid onto the map. Having a grid is handy for quickly (and roughly) working out how far away one part of the map is from another. When you create a new Coord layer you can set the line width for the grid, along with its color, and the Minutes Width, which allows you to set how large each grid cell should be. Unfortunately I couldn't manage to create two grids using different Minutes Width values to achieve a different grid cell size.

You can also create a GPS layer, which lets you interact with the gpsd daemon or a GPS device from a serial or USB port using either the Garmin or Magellan data format. If you are using the gpsd option, Viking can record tracks, jump to the current GPS location on start, and also keep the current GPS location at the center of the screen. You can nominate the host and port where gpsd is running.

The other layer type that you can add is a Digital Elevation Model (DEM) layer. As the name suggests, DEMs allow you to get an idea of the altitude and gradient of the ground, depending on how accurate your DEM data source is.

I found that attempting to add a layer showing either Google Maps or Transparent Google Maps would result in errors being printed to the console that maps were failing to download from the Google server. Google Satellite Images could download from the Google server, but when I was viewing at a scale where the legend showed units up to 1km, the map images would either fail to download or would download off to the top right of the current map display area. When using OpenStreetMap data I did not have these issues, and automatic tile downloading worked as expected.

Viking's File menu contains an entry, Generate Image File, that allows you to create a PNG or JPEG file of the map you are currently viewing. I created a few when viewing a OpenStreetMap layer with map downloading set to automatic to test this feature. The first image I created with default options worked fine. For the second image I nominated a resolution larger than the default and found that the map tiles required to fill out the image file were not automatically downloaded. For the third test I changed the meters per pixel setting to show half the number of meters per pixel than the default, and this image was created with all the required tiles. So if you change the zoom level (meters per pixel), Viking will download all the required tiles for you, but if you elect to create an image file with larger dimensions than the default, you might not get an image showing all the tiles you expect.

I found that the Preferences menu entry did nothing. Thinking that it might be an issue with file permissions, I tried running Viking as root, and still could not open the preferences window. If Preferences is a work in progress, it would be nice to get some confirmation that the preferences window is still on the TODO list by having a little dialog box pop up with a message to that effect.

You can easily drag waypoints around the map if you have placed them incorrectly, or roughly placed them on the map before zooming in. Although waypoints can be dragged around, I couldn't figure out how to drag around the points that comprise a track in order to edit it. You can select Edit Trackpoint and click on any Trackpoint along the Track and adjust the digital longitude and latitude values directly in the properties dialog, but it seems that you can't just drag track points around like you can with waypoints in the current version.

Despite some rough edges, if you are viewing tracks or editing waypoint data and you have good OpenStreetMap coverage in your area, then Viking is a great tool. If you're using Google Maps, you may have some issues using map tiles supplied by Google with Viking.

Ben Martin has been working on filesystems for more than 10 years. He completed his Ph.D. and now offers consulting services focused on libferris, filesystems, and search solutions.

Share    Print    Comments   


on Display your geolocation data with Viking

Note: Comments are owned by the poster. We are not responsible for their content.

Google maps downloading

Posted by: Anonymous [ip:] on September 04, 2008 09:48 AM
Google often changing little things in Google maps, Viking developers frequently have to reexamine their code to re-enable correct Google maps downloading. A convenient thing is that Viking caches Google map tiles at various scales so it doesn't have to download them every time. It's also handy when you're offline. The latest SVN releases of Viking (post 0.9.6) corrected the Google maps problems...


Display your geolocation data with Viking

Posted by: Anonymous [ip:] on September 04, 2008 02:56 PM
Unfortunately both google maps and google transparent seem to be broken as of 0.9.3, which is a real shame since it would be a killer app for gOS.

To get viking 0.9.3 running on gOS use the following commands

# sudo apt-get install debhelper automake1.9 autoconf autotools-dev libcurl4-gnutls-dev libexpat1-dev libgtk2.0-dev libglib2.0-dev libgps-dev xsltproc docbook-xsl docbook-xml dpatch
# sudo apt-get install gpsd python-gps gpsdrive viking gpsd-clients libgps-dev libgtk2.0-dev glutg3-dev libcegui-mk2-dev libxmu-dev libsdl-dev libpcre3-dev libspeechd-dev libtiff-dev libdevil-dev build-essential subversion automake

Yes I know ... there are some repetitions in there, but I'm lazy!
Next download the intltool source:
uncompress it in a folder and run
# sudo ./configure
# sudo make install

Now download the viking 0.9.6 source:
Uncompress it, and run the following
# sudo ./configure
# sudo chmod -R 777 *
# sudo make install

And you can then run viking using
# /usr/local/vbin/viking


Display your geolocation data with Viking

Posted by: Anonymous [ip:] on September 04, 2008 02:58 PM
Ooops ... i meant to say not working as of 0.9.6 ... note to self: proofread your posts .. sigh!


Preferences windows

Posted by: Anonymous [ip:] on September 06, 2008 12:44 PM
Thanks for this report.

Concerning preferences window, it will appear in 0.9.7. Currently, you need some compilation options to have it (geocaching module I think).


Easy in Mandriva

Posted by: Anonymous [ip:] on September 07, 2008 10:35 PM
In Mandriva 2008.1: install Viking via Mandriva Control Center or just type "urpmi viking" in a konsole


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya