Geo data

Tutorials >
Page updated July 2018.


Viking


See my Step 4 page for installing Viking.


Using Viking to import data from a GPS unit

Only some Garmin units can transfer through USB to viking (see the list here - works using a Garmin 60csx, but not a 62s)


For a Garmin 62s (and many others on the list) hook up the device to a USB port and read the gpx and waypoint files through a file browser, search in the Garmin/gpx and Garmin/gpx/archived dir's.

Viking supports layers including map backgrounds, colour-coding of tracks, waypoint symbols, and a lot of track and waypoints editing tools.

You can also geotag photos by correlating them against a track that was made at the time of shooting photos. Your camera's clock would first need to be synced to the GPS unit's clock, to the second - but, just in case it wasn't, there is an offset option so that if the camera's clock was different to the GPS unit's clock at the time of shooting, Viking can add/subtract so many seconds to/from the pictures' own timestamps (without altering the image timestamp data), so that the pics are correlated to the right points on the track.

Also, you can write geo-coordinate data to multiple photos from any waypoint. Plus, any photos with geo info can be imported to the map via dragging from a file browser.

What's limited is the ability to print decent maps as only the visible screen is sent to the print dialogue, which makes it impossible to print large scale of areas off the screen.

Other limitations are lack of drawing or labeling tools, and that waypoint titles can get crowded and overlapped. But then, this is purely a data compiler, not so much a map production suite (aka GIS).

One bug to watch out for is freezing of the program when zooming right down to the largest scale! So make sure you keep saving the work manually, every so often, because there's no auto-save or auto-recovery and you work can be lost!

Closing the program it doesn't ask to save your work either, although there is a toolbar button to "save and close."

Also there is no undo/redo function, which means that if you do something horrible you will have to re-open the last saved version.




Quantum GIS


Once you have collated your GPS data and tidied up tracks, renumbered the points etc, its time to make it presentable, with styled labels that don't overlap, polygon area shading, and quality image detail for printing.

What we need is Geo Info System software, and in Linux we have Quantum GIS (Qgis).

See my Step4 page for installing Qgis.

Update: Qgis is now at v3.0, which has seen some great improvements over v2.x. Notes below are updated.

Doumentation here: Qgis user manual


to import geo data from e.g. Viking, first export the layers from Viking as GPX files, then in Qgis,
  • open the Data source manager (new)
  • click on Vector layer button at left, select file and click Open, then click on Add, then select which attributes to import (routes, tracks, waypoints etc), and OK


The imported Vector layer from GPX file appears as a new layer in the Layers panel, you can rename the layer by pressing F2 if necessary.

New to Qgis is the Layer Styling panel to the right. Here you can set track line style and colour, waypoint symbols, and whether to have labelling for the Layer. Tracks may not be too visible until you set a different line style. Style and Labelling is also found in the Layer properties dialogue.

Vector layers from GPX source files are easy to update with new data. Once you have added tracks or waypoints or edited names, export the data to the same GPX file using Viking. Then click on the QGIS Refresh button, or zoom in and out if the Render box is checked at bottom of screen.

the only problem this may give you is that if you have changed the placement of labels and rotated them, and then the source file track/waypoint names are changed, refreshing the layer in Qgis may reset the placement/rotation of labels, as the changes were stored by the previous names.



Symbols and Styles



Using multiple symbol or line styles in a single layer



Track style




Filter waypoints/tracks in a layer


In case the source file has data that you don't want shown on the map canvas, you can either simply use Classify as above, and uncheck the features that you don't need or you can include/exclude any names that fit an expression

Use SVG symbols for waypoints




Get more svg symbols


Layer Labels


Qgis 3.0 now has a good labelling functionalty. With v2.x before, labels were positioned pretty badly, with no means to move them about and the only way to do so was with the EasyCustomLabeling plugin together with the Memory Layer Saver plugin.

It looks like Qgis has now incorporated this very tool into the main program, which is great. Only, compatibility with Qgis and this plugin is not totally perfect (in the case of layers previously labelled using this plugin). The label layer shows fine in v3.0, but as soon as you adjust a label position then all the labels flip horizontal, which is bad news for a layer with 100's of labels all set correctly.

From now on I don't think we need to use the EasyCustomLabeling plugin, and it might very well become obsolete soon.


To turn on labelling for a layer,
Important note: the label placement on the map is not going to look the same when you create your Print Layout, as the labels on the map will show same size on any scale (to be human readable), but in the composer according to the font size/page size.

Ideally you want to set up a print layout before moving labels, set the right scale, and then start moving your labels. Switch between map and layout window and refresh the layout each time to see if the label positions are good.

Also, find a good scale in the project window to work with and stick with it (zoom out just to pan around then zoom back to work) so that you can judge distance from points that the labels need in order to show correctly in the layout.

Note that with Qgis 3.0, labels can auto-move along a feature (especially tracks) when you zoom in/out or if you place a label near another one. So you need to check the labelling in the Layout window carefully. A label can also auto-hide if another label obstructs it (which is sometimes handy).



Tidy up label displays


In case you have some rather long waypoint/track names that are going to take up too much space on your map, you can add various functions so that the labels are shortened..




Calculate an area


If you draw an area then you'll have a polygon layer to work with.. -> click on New shape file, check on polygon and OK, and save it.. then click on the Edit and Add Feature buttons on the toolbar, and click on the map to start drawing - right click to finish (and enter the feature no.)

To edit the polygon area, click on the Node tool button and select a node - then either move it or double click to create a new node to move (but sometimes the new node is on top, sometimes underneath!).

There is a vector tool called polygonize (which needs shapely plugin), which will make polygons where lines cross and enclose space. So if you have an area completely enclosed, i.e. a track without gaps and its two ends cross over, closing the area, then you can try using this tool to find the area enclosed.
 

Processing > Toolbox > QGIS Geoalgorithms > Vector geometry tools > polygonize

You'll need to save the resulting polygons to a file as it only creates a temp layer.

You can run error checking with Vector geometry tools > Check validity to see where there are faults in the lines, e.g. loops or crossing. But it won't show you if there are gaps.

Or, another way is to use Lines to polygons, which will save the polygons to a shapefile layer:

Vector menu > Geometry tools > Lines to polygons

With your polygons, its easy to get an area calculation...


Printing


Toolbar > New Print Composer, name it, click OK..

or, Toolbar > Composer Manager, select a saved composer, click Show



Map tips




Create an inlay map


How would you create a small map and set it as an inlay in the corner of a bigger map, the small scale one being from the same Qgis layers as the large scale map but without all the layers showing and smearing all over it?

Easy, you set Layer Visibility for as many layers as would smear on the small scale map, to become non visible after a certain minimum scale, leaving perhaps some layers to give the outline, such as rivers or roads. You could add special layers just for the inlay map too, such as county borders and set Layer Visibility minimum for them to large enough scale so that they won't show on the main map - although they might not fit on it anyway.




Background topo maps


1. OpenLayers plugin
then select a map via Web menu, Web > OpenLayers plugin > OpenStreet/Google/Bing...

To keep the map for offline use, turn off other layers and then Project > Save as Image
- then later you can add the map (provided the zoom level is still what you want) with Add Raster Layer

2. QuickMapServices plugin is much better
it offers transparency in the layer properties dialogue, and also, when you go offline the map data stays happy in the print composer (the above plugin prints blank squares if the connection is lost!)

Note! Unless the map fills the entire page in the print composer, when printing, your map layers will become mis-aligned with the background map, which is unaccepable and worthless. So when you prepare to print, stretch the map to snap to the edges of the page - this is the only way to prevent mis-alignment.



Contours from OpenDEM (SRTM)


This is a simple way to add nice-looking elevation data to your maps, albeit, without proper contour labels and only at 25m intervals.

Note that the data is under the Database Contents License (DbCL) which must be attributed in any public use of it.



Set dark/coloured for 50m/100m intervals



Try also downloading areas from http://extract.bbbike.org/


Loading layers in other projects


To use the layer in other projects, with its rules and line styles, you need to embed the layer into your new project...

   Layer menu >> Embed layers and groups

then select a qgis project file and the layers to load in.

The problem is, however, you can't do anything to that layer (such as adjust line styles) as it belongs to the originating project. But what you can do is...

Note: "Save as layer definition file" does not save any styles or categorized rules



Geo-referencing a scanned map




Add Lat-Lon grid


View menu > Decorations > Grid - set "Interval X" and "Y" to 0.05, check "annotations"
Add scale bar : View menu > Decorations > Scale
(note that these will not be present in the print window - need to make others there)