Manipulate smartphone GPS data with QGIS
Many people have smartphones with GPS. Learn how to use QGIS to make better use of the data
These days, almost everyone has a smartphone on their person at all times. Most smartphones include a GPS sensor that you can use for navigation, or geocaching. One issue, especially for phones, is the small screen size. Analysing your GPS data, or setting up locations to navigate to, can be painful on these types of small devices. This is where QGIS, on your Linux laptop, can prove to be a huge advantage. You will learn how to take your GPS data from your phone and import it to your laptop. From there, you will be able to load it into QGIS and play with it in interesting ways. Since your advisor’s phone is an Android, we’ll be looking at this as an example. We’ll also be looking at My Tracks, which is an open source GPS track recorder from Google. If you have an iPhone, or you want to use some other GPS tracking software, the specific steps to get your data from your phone to your laptop will differ slightly. You will also learn how to create tracks and waypoints, leading to interesting things in the world.
Step by Step
What is QGIS
Quantum GIS (QGIS) is an open source geographical information system that runs on Linux, Windows, Mac OS X and Android. It supports several vector and raster file formats. It also supports several database formats and functions. It is built with a core and plug-in architecture, so any missing functionality can be added through a plug-in.
The download page includes instructions for several different Linux distributions. These binary packages are fixed at a certain version, which is 1.8.0 at the time of writing. You can grab a tarball or zip file of either this version or the current master branch of the Git repository. You can also grab a clone of the Git repository if you want to keep up to date with the latest development.
Setting up Ubuntu
Ubuntu and its derivatives don’t include QGIS in the default repositories any more. This means that you will need to add the QGIS repository to your installation yourself before trying to install it.
You will want to add one of the repository lines provided at the download page.
For the latest version of Ubuntu, you would addthelines:
deb http://qgis.org/debian precise main
deb-src http://qgis.org/debian precise main
to the file /etc/apt/sources.list.
There are similar instructions available for other distributions.
To install QGIS, you will need to update your cache list with the command:
$ sudo apt-get update
Once this completes, you will want to install both the core package and the Python package (this is to support Python plug-ins). You can get this with the command:
$ sudo apt-get install qgis python-qgis
Getting a track on your phone
My Tracks is very simple to use. Once it’s opened, you need to select the record option from the menu to start a track. When you’re done, you can save it to a file with a filename that you select. You can set the options of how often points are taken, either by time interval or distance interval.
Exporting the track
Once you pick the track of interest, you need to select the option ‘Save to SD card’. You will be given the option of what file format to save it to. You will need to select GPX, as this is the format supported by QGIS.
Copying to your laptop
You will need to copy this file to your Linux machine. On your Android phone, the file is stored at /mnt/sdcard/MyTracks/gpx. All of your exported tracks will be placed here. Select the one of interest and copy it over to your laptop.
When you first start QGIS, you are presented with a blank canvas. On the left side, you will find the list of layers for your project. The right side is the display of your GIS data.