Weekend project:
Boids implementation in QGIS

I had a couple of hours of spare time over the weekend, so I decided to start work on implementing a simple (and well-studied!) ABM in Python for use as a QGIS plugin. I put together a quick series of notes on how to build it, which can be found here. I’ve uploaded the complete scripts to my github page. The project so far implements all of the traditional boids behaviours, as described by Reynolds (1987).

Things it seems to do well:

  • All three boids behaviours work
  • Behavioural weighting allows fine tuning of the three behaviours for species and context specificity
  • Placement of agents at arbitrary initial positions works really well
  • Steering away from the study area boundaries looks clumsy but is very effective

Things that need improvement:

  • The study area limits are currently a rectangle, this should be updated to interact with a shapefile layer containing shorelines, etc.
  • Currently the perception distance is a perfect circle with a fixed radius around the centre of the agent, so is avoidance distance. These might need to be revised to a more complicated system to better represent directional vision, etc.
  • All agents always enact their behaviours in the same order each time.
  • Presently the model is implemented in two dimensions only, this is for ease of testing and can be fixed in the future.

Georeferencing Humminbird sonar files

Commercially available side-scanning sonar units sold for anglers are a good, low-cost option for substrate classification in rivers and lakes. The units are small, portable, and very inexpensive. Unfortunately retrieving data from these units often involves replaying data on the unit itself or capturing screen shots which are typically distorted representations of the bottom. Overlaying the data on a map could be very helpful. I put together a quick C++ project to turn Humminbird 698ci side images into georeferenced TIFF files for a river surveying project. The focus is on legibility and some spatial accuracy is sacrificed for image clarity. The project as well as a fuller writeup of how to use it can be found on github here: sonar gridder.

Check out my other projects on github too while you are at it!