Laser art

I made this image from terrestrial laser profiler data collected on Langjökull, Iceland during a project that Neil Arnold, Ian Willis and I were undertaking in 2008 to investigate the surface properties of glaciers. This image is the projection onto a horizontal plane of the point cloud, i.e. the set of points where the laser radiation was reflected from the surface. The spacing of the points, and hence the average brightness of the image, depends on the orientation of the glacier surface relative to the beam of the laser profiler, so there is some sense of the surface topography in this image. (The topography can in fact be extracted in great and precise detail from the point cloud.) The truck in which scientists and equipment were carried onto the glacier is also visible in this image, at the bottom right.

The image is quite large, and may not display in all its aesthetic glory if your monitor doesn’t have enough pixels.

DEM1extlocs

The image is on display in the Beyond Images exhibition as part of the Cambridge Science Festival 2016.

Free software

I use software a lot. As well as the usual things – preparing and editing text documents, presentations etc, and communicating with the outside world – there are more ‘specialist’ applications connected with my research, involving manipulation of geospatial data, quantitative image processing, and generally just crunching numbers. There are usually several software possibilities for a particular application. Why does the choice matter? I think three considerations are important to me here:

  • functionality
  • reproducibility
  • transferability

Functionality is the most obvious consideration, of course, and is about whether the software can actually do all the things you need it to do, but it is also about whether you can remember how to do them. These two aspects of functionality can pull in opposite directions, as software evolves to become more comprehensive but also more complex. Reproducibility is about whether you can also perform the same tasks on another computer, in another location. Software that exists only for the latest version of one particular operating system isn’t as reproducible as something which exploits fewer features of the OS and can run on multiple platforms. The concept of transferability is similar, but has more to do with the output generated by the software: can it be used by someone else, who may not be running identical software to yours, in a form in which they can use?

Functionality has traditionally tended to be the preserve of commercial software, where large programs or suites of programs have (ideally) been developed and tested extensively – and expensively – to provide stable, comprehensive performance of a wide range of tasks. This kind of software tends not to be free, and tends to become more complex, and hence hard to learn and to remember, as it evolves. It also tends to exploit new features of operating systems. Reproducibility and transferability, on the other hand (and they often march together), are favoured by low – preferably zero – cost, support for multiple platforms and avoidance of dependence on the latest features of their operating systems, use of open file formats, and lower complexity. Open source software (which isn’t the same thing as free software though the categories often coincide) tends to embody the criteria of reproducibility and transferability, for a variety of reasons. One’s concern is with its functionality.

My experience, which isn’t backed up by careful research, is that the functionality of FOSS (free open-source software) and its close associates tends to increase very quickly. I suppose the reason for this is the size – and the motivation – of the development community. Here are some examples of software choices I have made in the past few years.

For everyday text processing, preparing presentations, drawings etc, and simple manipulations of tabular data, I completely abandoned Microsoft Office a while ago (I have a rather strong aversion to Microsoft), and switched to OpenOffice. Well, to be exact, I switched first to a port-to-Mac called NeoOffice, and then to LibreOffice. At the time I switched the FOSS software was perhaps a little under-powered, and compatibility with MS Office was sometimes an issue, but that is not true now. It does everything I need it to do, and I can share documents with Microsoft Office users fairly straightforwardly. Similarly, for simple image manipulation I used to use Adobe Photoshop but switched a few years ago to GIMP. At the time it was a bit of a pain to run it on a Mac (I had to fiddle around with something called X windows which I never really understood) but now it is very straightforward to use, and powerful, and I don’t miss expensive Photoshop.

For specialist applications I do still sometimes need to use the commercial software like ArcGIS and Erdas Imagine, but mostly I use the freely available and multiple-platform ImageJ and Multispec, and QGIS. ImageJ, which is very good for performing image algebra, is free but not open-source, though it has an interface that allows users to write plugins. Many do, and they share them generously. Multispec is also free but not open source. It is designed for multispectral image processing and, unlike ImageJ, it understands georeferencing. I find it a very quick and effective way of manipulating the geoereferencing characteristics of images as well as performing multispectral – and hyperspectral – image classifications. QGIS is an increasingly impressive GIS program, based on GRASS. My early experience with QGIS was sometimes frustrating, and I had to learn some Unix in order to install all the bits and pieces that it needed to run on a Mac, but that is now a much smoother experience. All of these programs are lightweight enough to run on a low-spec laptop computer in the field, and I have used them in that way many times. I increasingly use them for teaching, too. It is much easier to convey the principles of image processing and GIS using simpler software than confusingly highly specified complex programs – like learning to fly in a microlite rather than a 747. They are also good enough for 99% of the research tasks that I need to accomplish.

And for general programming, there is GNU Octave. This is now often, and fairly, described as ‘free Matlab’. I have not yet encountered any Matlab code that I could not run in Octave either immediately or with some small and obvious edits. Here the improvement in functionality has come from my own increasing understanding of the programming language itself, rather than major enhancements in what Octave can do. With copies of ImageJ, QGIS, Multispec and Octave on my Macbook Pro, I feel well equipped to tackle even very complex image processing and programming tasks while travelling away from Cambridge.

GNU Octave

I am a big fan of FOSS (free open source software), for a number of reasons which I might get round to writing about. A few years ago I needed to choose a serious high-level programming language (my brain being too middle-aged by now to cope with learning more than one such language) and I alighted on GNU Octave, which is a lot like Matlab but free. As well as very specific programs to solve particular problems that are unlikely to be of much interest to anyone else, I also occasionally write general utility programs. I will share some of these in case they are useful to anyone else.

GNU octave scripts are plain text files but I can’t upload such files to WordPress, so I have converted them to .odt format. To use these scripts, you will need to resave them as plain text and change the file extension to .m

These two scripts, which I wrote ages ago and which Zuzanna Swirad helped me to tidy up, are for converting between geographical (latitude-longitude) and transverse mercator coordinates.

NewTM1

NewTM2

These scripts are for performing Molodensky transformations between different geodetic datums.

molod

getdatum

This script performs a two-dimensional linear regression fit. It is intended to find the optimum linear transformation (rotation, scale, offset) that will match one image to another, or a map to a particular projection, etc. I mostly use it for manually georeferencing scanned paper maps.

linfit