One project I’m working on at the moment involves exploring a dynamic extension of the Isomap algorithm for visualising constantly varying real-world road networks. Currently, we are testing out the method on a small scale simulated road network, and most of the original code (written by Laurens van der Maaten, with updates by Alexei Pozdnoukhov), was done in Matlab. Since this work is eventually going to have to run on relatively large datasets, and probably behind the scenes on a server somewhere, we decided that Python was the way to go. The goal therefore was to reproduce the Matlab code using only Python libraries, and the fewer additional libraries required, the better.
- Wed 12 August 2009 cfarmer
FOSS4G and teaching GIS
Mon 20 July 2009 cfarmerTwo quicks notes to share:
Firstly, please check out this excellent introduction to GIS by Tim Sutton, Otto Dassau, and Marcelle Sutton in partnership with the Chief Directorate for Spatial Planning & Information, Department of Land Affairs, Eastern Cape, South Africa, and the Spatial Information Management Unit, Office of the Premier, Eastern Cape, South Africa. They use QGIS to present some basic GIS concepts and skills, and I particularly like their section on Coordinate Reference Systems.
Secondly, don’t forget to checkout the FOSS4G 2009 Free and open source software for geospatial conference in Sydney in October. There will be loads ...
‘Watch’ long running processes
Wed 08 July 2009 cfarmerThe other day I was loading a shapefile of approximately 11 million records into a PostGIS database (stay tuned for more on that later) and I wanted to know when shp2pgsql was done. Instead of continually checking the console, I decided to ‘watch’ the process using the *nix command
watch
. I discovered this handy tool a while ago, and have found that for long running processes, I can usewatch
to notify me when the process has finished, using the following command:watch -ben 1 "ps u -C shp2pgsql"
Syntax highlighting with PyQt
Thu 02 July 2009 cfarmerA few months ago I decided to add syntax highlighting capabilities to a piece of software that I have been working on. Since it is a PyQt based application, the obvious choice for implementing syntax highlighting was to use Qt’s QSyntaxHighlighter. Unfortunately, there weren’t many examples around that implemented syntax highlighting in Python, so I decided to post my own.
R featured in New York Times
Wed 28 January 2009 cfarmerI’m sure everyone has seen this already, but I’m going to post it anyway, as I think the more exposure open-source tools get, the better off we’ll all be!
Check out this New York Times article which features
R
, the open-source statistical programming language.R
now has quite an extensive range of spatial analysis options, and is the software of choice for researchers using spatial statistics and geographic information analysis.gedit: The ultimate LaTeX editor
Fri 12 December 2008 cfarmerOut of the box gedit is a basic text editor, but it comes equipped with about 12 standard plugins, and another 9 readily available. In addition to this, there are a range of ‘third-party’ plugins developed to do various specific tasks, such as assist you in writing and exporting LaTeX documents! First, get all the basic plugins:
sudo apt-get install gedit-plugins`
and enable them in gedit by going to
Edit > Preferences > Plugins
, and checking the ones that you want.Second, make sure you have all the required dependencies for the actual \(\LaTeX\) plugin: 1. The plugin is written in Python ...
Quick guide to setting up a PostGIS database
Fri 28 November 2008 cfarmerRecently I decided to seriously start using PostGIS to manage my spatial data. As I have several projects on the go, organizing and managing my data effectively has become extremely important, and PostGIS is by far the most convenient way to do this. There is lots of documentation out there that explains in detail how to set up PostGIS, but by far the best reference I’ve found is from Tim Sutton’s blog, mainly because he uses Ubuntu, and sudo-apt gets everything you need to have PostGIS working in minutes.
View spatial data attribute tables in R
Tue 14 October 2008 cfarmerMany GIS offer the ability to view the attribute table of a vector layer. While this is perhaps less obvious in the R environment, it is not impossible. The following command allows you to visually inspect, and change any data.frame (or other vector, matrix, etc.), including Spatial*DataFrames.