Friday, August 31, 2012

Writing a QGIS Plugin

Such an easy title... such a smart idea... HARD WORK!!!

Anyway... after stumbling around for a bit with the PluginBuilder plugin... QGIS Cookbook etc... I finally settled on grinding through a tutorial... Which has proven the most rewarding.

I have learnt a few things about python and compiling and using the linux terminal that have proven useful.


  • The shortcut for opening the terminal window is Ctrl +Alt + t   (Yaay...)
  • Some compiling (the deadly c-word!) needs to be done.  Fortunately the pluginbuilder produces a super special file called a makefile which kind of knows what needs to be compiled and how.  All that I need to do after changing the user interface or editing the UI dialog code is to open the terminal :) select the directory in which the plugin is situated (cd ...) and type "make". The compiling is done!
  • To get the directory string (to type after the cd command) I simply open it in a window and right click on the relevant directoy tab and copy it and paste as file name into the terminal window.
  • at first the compiling di not work properly, I found that by simply typing pyrc4 or whatever package is necessary for the compiling, I was given instructions in the terminal as to how to go about installing it.
Those are just somelessons... as for writing the plugin... I suggest that anyone who wants to do this and is not a knowledgeable programmer finds a mentor and grinds throught the tutorial!

to be continued...!

Ramblings...

OK so what's been happening...


  • I've tried to get some work done meanwhile the fish have gone hungry...
  • I've switched from Mac to Windows to Linux Ubuntu 12 and I am finally happy... except I miss an MSOffice that works properly.
  • I've got (more) clarity on the direction of my research, visited the study site, a beautiful pine plantation not too far away...
  • I've been figuring out R... modelling relationships between various tree parameters... or at least trying to!
  • I read an good book last night... The Go-Giver.  The principle being that we will be more successful if we give... stuff, of ourselves, of what we know, etc.... Hence the public sharing of my blog... Maybe someone could get something somewhere in it!
  • I'm currently working on developing a plugin for QGIS that would contribute a useful tool as part of my research "package" that I hope to deliver by the end of next year.
  • I found a great song for motivation :) ... The Script - Hall of Fame


Happy weekend!