GpsPrune development

GpsPrune is available to download from the downloads page, with the latest released version being version 23.2. Details of the development of forthcoming versions are given here.

Please also look at the user guide for details about the user guide now available (in PDF and EPUB formats) for GpsPrune. Your feedback is valuable and much appreciated.

Forthcoming features

The following features are on the list for version 24. Please also see the wishlist for new features which have been proposed by users of GpsPrune.

Version 24

... and possibly not

Preview for testing

The following is a preview release of version 24 for testing - please be aware that this may well contain bugs of unknown nastiness. If you want to help with testing or with translations, please try it out and send back reports of any bugs you find (either by email or via the forums at sourceforge).

Jar file

Runnable code for testing (1.37 MB)
gpsprune_24_test.jar - Get this one if you want to try it out
and help find bugs (or help with translations)
(Java 11+ only)

Progress

Version 23 is now available in two forms, because it turned out there were runtime issues with Java 8. I thought that compiling with Java 11 with a target of Java 8 would work properly, but it turns out not, so there's now a separate Java 8 jar produced by a Java 8 JDK, which in turn required a handful of minor tweaks.

Search

There's a new track search function for version 24 — this is based on some of the ideas thrown around in Issue 14, although it is based more on the "find me that file I'm looking for" workflow rather than the "show my fitness progress in a table" idea.

Firstly you choose a directory to search, and whether to also search in subdirectories or not. At this point all the files are scanned and shown. Then there are three options for searching — by text, by date and by location. The text search is fastest, as the files have already been scanned, and can find text in the filename itself, the track's name or description, and also the waypoint names. This makes it much easier to find "that" track file you're looking for when you can't necessarily remember the exact filename or directory but you can remember the name of the place you visited, or the person you were with.

Secondly, you can restrict to a specified date range, so for example you want to look for any files (in any subdirectories) from March of last year, or from a particular weekend. This parsing works best for xml formats like gpx and kml, where the timestamps can be easily recognised. And finally, there's the option of searching by location. Simply select an existing point (or create a new one and select it), then specify a location filter with a distance (in kilometres, metres or miles). Then the files which have passed the previous filters get re-read and the coordinates parsed again, looking for any points that fall within the specified distance of the current point. This covers the case when I want the track I recorded at a particular place, but I can't remember when I was last there and don't know what I would have called it. Or maybe I just never name my tracks or waypoints but I know I was within 5 km of that village sometime.

Once the filters are processed, the dialog shows a list of all the matching files it found, and I can select a file (or multiple files) from the list and then load them. Or if there are still too many matches, I can modify the filters and refine my search without re-scanning all the files again.

Icons

Also, here's something for which the ground was prepared with version 23 — now that the icons are all consistent and vector-based (and prune-coloured!), we have the chance to render them at different scales if we wish. So here's what GpsPrune looks like when you choose double resolution, compared to the default appearance on the left.

This affects most noticeably the toolbar icons, the +/- zoom controls and the toggles at the top of the map view. But also other graphical elements such as the waypoint icons, the weather images and other controls such as image rotation or audio play/pause buttons. In this example screenshot the map images are also shown bolder with larger text, but this is not a new feature, it's just the result of choosing the alternative tile server from "osmand".

Also shown here is the small addition to the "display settings" dialog, with a new checkbox to control the icon size. I hope that's fairly self-explanatory! You have to restart GpsPrune after changing this setting though (or the window style setting).

Config

With version 24, a minor change is being made to the location and name of the configuration file used by GpsPrune. Since the very beginning (when GpsPrune was still called just 'Prune'), the config was stored in a file called .pruneconfig in the home directory of the user. The user could choose to save it somewhere else under a different name, of course, but the default was there. This has the main advantage that the user's home directory can always be found on any platform, so it's consistent everywhere. There are a couple of disadvantages though — some people may not like having a (hidden) file in their home directory, and it would be better to store it in a place more consistent with other applications on the same machine. For Linux systems this may be defined by the XDG directory specification, for Windows users it may be some cryptic path regarding "AppData" and "Roaming", and for Apple users I don't know. Plus, Prune isn't called Prune any more (since many years!) so it would be nice to rename the file too.

So the idea currently being developed is this: to determine where the config file should be located, we first look whether XDG_CONFIG_HOME is set, which will give us the directory for "user-specific configuration files". Probably this hasn't been set though, so then we look whether APPDATA is set, which on Windows will give us that "Roaming" path or its equivalent. If that's not there either, then we look for a .config directory under the user's home. And the new filename should be "gpsprune.config" by default — it doesn't need to be hidden any more with a leading dot.

Now, in order to work out whether to move the existing config file to the new location, we first need to ask the user, because if they're still using old versions of GpsPrune (which don't know about the new location), then moving the file might be inconvenient. If they say that the file shouldn't be moved, then we remember that (in the config) and don't ask again. But if they say yes then we try to make the new file in the calculated location, and hopefully we have the write permissions. And hopefully we are allowed to delete the old file too, to clear things up.

A similar approach covers the case where the working folder you're starting GpsPrune from has its own .pruneconfig file to be used instead of the default. Sidenote: this can be useful if you want to keep multiple separate configurations active, with their own "recent files", their own maps and display settings, and their own time estimation parameters. Think one for cycling and one for hiking, for example. The same migration path will be offered here, suggesting to move the file to gpsprune.config instead.

The plan is to keep this double possibility with version 24, with both filenames and sets of paths supported. Then with the subsequent version the plan is to remove support for the old "~/.pruneconfig" default. But the possibility to choose your own name and location for this file will still of course be available, you just need to specify the path at launch.

Descriptions and comments

Something minor - some GPS devices ignore the "description" field of points and only show the "comment" field. So now, the GPX export dialog lets you select whether any description should be copied to the comment if the comment isn't present. With this option checked, and if a point has a description but no comment, then the value of the description field will be also written out in the comment field, and so will be displayed by the GPS receiver.

Help

As always, all help with the translations will be very welcome! Please help to expand and improve the coverage of your favourite language. Please see the "translations" section below if you'd like to help.

Since February 2015, GpsPrune has a repository at GitHub. It's got all the history since version 1 in there, and the plan is to keep it updated with the latest released code. For those who find submitting git pull requests easier than submitting diffs by email or sourceforge, then this might be something for you to look at. It's also a good way of raising issues if you have questions or bug reports. I'm guessing that for most people, especially those without github accounts and those unfamiliar with git, the other methods of bug reporting and patch submission will continue to serve well.

Translations

LanguageCompletion
for 22.2
Completion
for 23.*
Completion
for 24*
English, German,
Swiss German,
Dutch, French
100%100%100%
Italian97%
Spanish98%
Polish96%93%92%
Portuguese88%
Chinese, Catalan99%95%90%
Russian, Hungarian96%92%87%
Romanian, Swedish92%89%84%
Finnish87%83%
Afrikaans, Czech88%85%80%
Korean, Japanese66%63%60%
Turkish43%40%38%
Ukrainian27%26%25%
Danish22%
Welsh18%19%
Norwegian12%
Indonesian, Farsi< 10%

The translations of GpsPrune are in greatly varying stages of completion. This table on the right summarizes the percentage of translations which are complete for each language. If you want to help with these translations, there are now three (count them, three!) ways for you to do this. The idea is that if the translation process is made as easy as possible for the translator, then the likelihood is higher that somebody might feel like helping out. So to make the entry barrier as low as possible, here are the options, in order of preference:

Obviously it would be great to get the nearly-complete languages back up to 100% again, especially those which were complete for earlier versions of GpsPrune, like for example Spanish, Catalan and Chinese.

Unfortunately there are also several languages here less than half-complete, which is why they've not been included in the release jars. You can use these files if you want (available from the download page), but obviously most of the texts are still in English. Any thoughts from users of these languages? Is there any interest in reviving or boosting these translations?

Development cost

There's an interesting tool called SLOCCount, which goes through a code tree and counts up how many lines of code there are and in which languages. It seems to ignore blank lines, and comment lines and so on, so its figure for GpsPrune is (at the time of writing) 36 thousand lines rather than the 52 thousand which a simple wc -l gives. But anyway, then it uses a formula to estimate how many person-months it would take to develop a traditional commercial product of the same size, and how many dollars you'd have to budget for it (including a bunch of overheads such as project planning and specifications etc). Clearly most of those assumptions and parameters are completely invalid for a small open-source project, but just out of interest, I tried it out. As of version 15, GpsPrune is now worth over 1 meeellion dollars! And for you, it's free :)

The estimator at openhub however comes up with a figure of only around half a million dollars, even using apparently the same parameters, so that might give some indication how meaningful the estimates are! Oddly, this tool completely ignores valuable comments in the code, and valuable text files and properties files, but inconsistently does count an xml file the same as raw code(?) and also cares whether a logical line of code is split into several lines for readability or not. Is a four-line if block really worth so much more (or so much more costly to produce) than exactly the same expression in a one-liner?

Update: there's a bunch more on this topic at development stats, including some pretty charts of GpsPrune's metrics.

Development activity

Gource screenshot

There's a very interesting tool called gource (like source but with a g), which makes very pretty animations to visualise a software tree as it grows and develops. Using the logs from the source control repository, it knows the file tree structure, it knows when each file was added, edited or removed, and by whom. And it's able to animate this, with each file represented by a little coloured ball, and each checkin causing balls to appear, move and shuffle around the bouncing tree. Check it out on youtube, it's mesmerizing.

So I tried this little tool out on the GpsPrune tree, and it works great. It shows the bursts of development (new files, often concentrated in single areas, reorganisations of files between directories) between long periods of testing and fixing (mainly edits to files, especially translations and build files). It shows the appearance of new functions like little flowers bursting into bloom, and the gradual transformation from a small bunch of dots into the current package hierarchy, as shown in this screenshot.

The purple dots shown here are the java files, the blue and green dots are the images, there's a bunch of blue translation files, and a small scattering of other file types such as xml and txt.

Credits

The following credits also appear in the "About" screen of the GpsPrune application, but it's worth repeating here - grateful thanks to all those who have helped contribute so far, by whatever means!

GpsPrune code written by :activityworkshop.net
Exif code written by :Drew Noakes (drewnoakes.com)
Many icons provided by :Eclipse, fontawesome.com
Services :SRTM data courtesy of the U.S. Geological Survey usgs.gov mirrored thanks to kurviger.de, Wikipedia services by geonames, maps from Openstreetmap, weather forecasts from Openweathermap.org, geocaches from opencaching.de, photos from mapillary.com, routing by GraphHopper.
Deprecated services :Maps from cloudmade.com, openpistemap.org, opencyclemap.org, and thunderforest.com, geocaches from opencaching.com, photos from panoramio.com, Gpsies download and upload by gpsies.com.
Translators :Ramon (ch), Miguel (es), Inés (es), Piotr (pl), Petrovsk (fr), Josatoc (it), weehal (pl), theYinYeti (fr), Rothermographer (ro), Sam (zh), Rudolph (af), nazotoko (ja), katpatuka (tr), Rémi (fr), Marcus (pt), Ali (fa), Javier (es), Jeroen (nl), prot_d (cz), György (hu), HooAU (ko), Sergey (ru), Gilles (fr), serhijdubyk (ua), Péter (hu), Matteo (it), Peter (hu), Oana (ro), Cristian (ro), Roman (ru), Erkki (fi), Paolo (it), Maciej (pl), Erik (sv), Carlos (es), Tche333 (fr), J.M. (ca)
Technical feedback
and patches :
Piotr, freegeographytools, Rudolf, Steven, Jose, Jeshi, Denny, Thomas, Jozef, Gregor, Robert, Jani, zapfen, Joerg, Alexandre, Anti, José, Arvee, Sebastic, PeHar, fperrin
Mac know-how :Tyme, Daniel, Michael, Richard, Marek
Translations helped by :Open Office, Gpsdrive, Babelfish, Leo, Launchpad, Wiktionary, DeepL
Development tools :GNU/Linux (originally Mandriva, now Debian and Mint), Java (originally Sun, now OpenJDK), an IDE (originally Eclipse, now moving to IDEA), version control (originally Subversion, now git), Gimp, Inkscape, bug-spotting (was findbugs, now IDEA and spotbugs)
Other tools :Garble, GPSBabel, Povray, Exiftool, Google Earth, Gnuplot, JOSM, TeX Live, Sigil
Thanks to :Friends and loved ones, for encouragement and support

Alternatives for the GUI

As discussed above, the appearance of the standard java/swing GUI under linux (especially the fonts) is sometimes disappointing. So if the "Nimbus" or "GTK" themes don't please everyone, we could perhaps think of alternatives to java and Swing to present the GpsPrune GUI.

Qt, using either C++ or Python

screengrab of Qt prototype

This first idea has been floated for a while now, with the following basic prototype made to demonstrate the basic functionality. It shows the compilation of C++ code into a GUI application, shows the basic layout including menus, toolbar, status bar, the split main screen and various resizing behaviour. It also shows the techniques for internationalization of all the texts using Qt's standard translation mechanism.

This example uses natively-compiled C++, but in theory it could use Python and Qt instead. This has the advantage that the GpsPrune code wouldn't need to be natively compiled separately for each possible platform (of which there are many!) but instead could just be distributed as one single source file. However it would have two disadvantages - it would need a python runtime in order to run, so an additional large dependency for everybody to install, and more importantly it would also rely on the PyQt library to be installed, which adds more fiddling.

Java, using SWT

screengrab of SWT prototype

In October 2014, a new experiment started to rebuild the main GpsPrune GUI using Java and SWT. The results are shown to the right, laying out the basic GUI elements and getting the resizing to work properly. There's a menu and toolbar, a status bar, and exactly the same multi-language support from the "normal" GpsPrune application rather than a separate Qt technique. This saves translation effort as the identical files can be simply re-used.

This needs some more investigation to see if it's worthwhile, or if the SWT requirements could cause problems for users on the various platforms. But all it needs is a java runtime and the SWT library, both of which are platform-dependent but available for all the major platforms. For the major linux distributions these things are already included.

The current idea is to gradually expand this prototype, gradually taking in more components from the "normal" GpsPrune and seeing what difficulties arise. Apart from simply replicating the existing dialogs and functions, there are two proposed guidelines to shape further improvements. Firstly, each dialog should be able to rebuild itself, so that changing the language will have an instant effect everywhere without requiring a restart. And secondly, the functions which need dialogs should be completely separated from the actual data manipulation that they do - this will make automatic testing easier and will also allow a "Redo" button to be implemented.

Update 2022: OK, so the "current idea" didn't really come to fruition, but the "Redo" function is finally on its way (planned for maybe version 25). It's turning into a huge refactoring exercise, but the data manipulation will at the end be separated from the Gui, and the benefits of testing are already apparent. There's still no huge incentive to push for SWT, and no loud calls from users unhappy with the Swing look. Maybe the introduction of the themes has reduced the pressure.

The following jar is for those interested in what this SWT version could look like. It's very basic so far, and doesn't actually do much editing or display of the files. But at least you can see if SWT works on your platform, try out the Help menu and Settings menu, load a kml or gpx file to scroll through the points, see the altitude profile and delete a single point.

Jar file

SWT code for testing (300 kB)
gpsprune_swt_011.jar - Get this one if you want to try out the very basic SWT prototype

This seems to be a fairly promising start, with a few things working already, but obviously an enormous amount of functionality still missing. Looking at the time taken to get this far, and the amount of (re)work required to get everything back up to the usefulness of the regular GpsPrune application, it seems like the proposed benefits are perhaps not great enough to justify the effort. Maybe the translation to SWT would be more reasonable if that was the only change required, rather than the restructuring of Functions and TrackOperations being done here, but then the benefit is even smaller, basically just an improved appearance on some platforms. This effort could probably be more usefully applied to enhancing the existing GpsPrune rather than re-doing a lot of the existing work.

Screenshots // How-tos // How-tos (français) // How-tos (deutsch) // How-tos (español) // User guide // Demo videos // Problem-solving // Configuration // Download // Dependencies // What's new // Development // Wishlist // History // Old Screenshots // Internet Fame // User survey // Dev stats