An Introduction to Prune
Snip and Clip
Have more fun with your GPS data with this easy-to-use Java-based tool.
Pretty much any device with a GPS receiver can save GPS data as GPX files. But what are these files good for? Quite a lot, provided you have a nifty tool like Prune [1]. This application looks deceptively simple, but it packs some rather useful features that can help you get the most out of your GPX files.
Configuring Prune
Prune itself doesn't require any installation. Because the application is written in Java, the only mandatory requirement is the Sun Java Runtime Environment. Prune is distributed as a ready-to-use .jar archive, and you can run it by either double-clicking it or using the java -jar prune.jar command in the terminal. Before you do that, though, you might want to install a few additional packages to extend Prune's default functionality. For example, to enable real-time 3D display of GPS data, you should install the Java 3D libraries [2]. To install the libraries, download the .bin installer and follow the instructions in the README.TXT file.
Another useful addition is the ExifTool utility for handling Exif data in JPEG image files. Prune uses this tool to write geotags to the correlated photos. The ExifTool utility is available in the repositories of many popular Linux distributions, so you can install it with the use of your distro's package manager.
On Ubuntu, you have to install the libimage-exiftool-perl package. If you are using a standalone GPS receiver, you can use Prune to read data directly from the receiver. To enable this feature, you need to install the GPSBabel tool, which is also available in the software repositories of most mainstream Linux distros. Finally, if you want to be able to generate various charts, you should install the gnuplot utility.
Although Prune runs perfectly with default settings, you can override them by creating a .pruneconfig configuration file in your home directory then specifying your own set of custom parameters. For example, with the prune.directory parameter, you can specify the working directory:
prune.directory=/home/user/gps/
Prune supports several languages besides English, and with the prune.languagecode parameter, you can set the default interface language as in the following line:
prune.languagecode=DE
If you prefer to use imperial units instead of metric, you can set the prune.metricunits parameter to n:
prune.metricunits=n
By default, Prune uses the Mapnik OpenStreetMap server, but you can specify another server via the prune.mapserverindex parameter:
prune.mapserverindex=2
In this case, 2 refers to the Opencyclemap server, which displays maps with bicycle paths.
Using Prune
Once it is started, Prune displays an empty canvas, so the first thing you have to do is open a GPX file (see the box titled "What Is GPX?") by choosing File | Open file and selecting the desired GPX file. To enable the background map, click on the Show map icon. This displays the map either from Mapnik or from the server specified in the .pruneconfig file. Also, you can switch to a different map server at any time with View | Set map background.
What Is GPX?
GPX stands for GPS eXchange Format. Based on XML, this format is designed for storing and describing GPS data so it can be accessed by any application that supports the GPX format. A GPX file contains, among other things, information about waypoints (sets of coordinates that identify a point in a physical space), tracks (ordered collections of points), and elevation (height above sea level). If you open a GPX file in a text editor, you'll see that the file's structure consists of a number of nodes, wherein each node represents a waypoint. Each node contains a waypoint latitude and longitude, a timestamp, and an elevation. This information can be presented in a meaningful way by any application that provides support for the GPX format, including Prune. Many GPS devices currently on the market allow you to export GPS data in the GPX format, but it's still a good idea to double-check to see whether the device you are about to buy supports GPX. Otherwise, your options to get GPS data out of the device will be rather limited.
Editing Track Points and Creating Waypoints
The GPS track displayed on the map consists of track points, and the Track details section in the left pane displays the total number of points in the current track (Figure 1). Below the Track details section is a slider that lets you move from point to point.
By clicking on a specific point, you can view detailed information about it. (To zoom in and locate individual points, use the Zoom buttons on the map or the mouse scroll wheel.) From here, you can view information for the selected point in the Point details section in the pane on the right. This information includes latitude, longitude, altitude, time, and speed. Prune also allows you to edit the point's data, which comes in handy when you need to make corrections to the track. To edit the point, choose Edit | Edit point, select the property you want to edit, and press the Edit button (Figure 2).
The Edit waypoint name command lets you assign a name to the selected point. This automatically adds the point to the Waypoints list in the left pane, which acts as a bookmark list.
At any time you can locate the "bookmarked" point on the map by selecting it in the Waypoints list. The Edit menu contains a few commands that allow you to tweak the track. The Compress track command, for example, allows you to streamline the track by removing redundant points, and the Delete point command lets you delete individual points on the track.
The Select menu has commands that allow you to specify ranges. For example, if you want to know the total distance of the GPS track, choose the Select all command to select the entire track. Then you can see the range information in the Range details section in the right pane.
Also, you can specify a range for a specific track segment, which can be useful if you need to get information about a specific part of the route (Figure 3). For example, you can use this feature to compare your average speed on a flat stretch of the route to your average speed when you move uphill. Speaking of uphill, the pane directly below the map contains an altitude profile of the current route, and clicking anywhere on the profile automatically selects the related point on the map.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.