Another QGIS plugin idea I have had is to create a method of splitting the map canvas within QGIS to have two side-by-side maps that can track and interact with each other. There are lots of possibilities for this type of “reconfiguring” of the QGIS interface on the fly via plugins, so I decided to dive in and give it a go.
Here is a link to a video showing some of the basic operation of the MirrorMap plugin.
*** This plugin is very “Alpha” in that it makes the size of the map canvas static after invoking the plugin (until you launch QGIS again), does not handle layers of differing projections, does not allow for re-ordering layers in the mirror canvas, and many other deficiencies I am sure. But hey, its just a test!

MirrorMap in action
GIS Tool Dev, General
One of the things I have been working on this last couple of months was a prototype of a Decision Support System (DSS) for web based interaction with In-Stream Tidal Power data and models. Renewable energy is a big interest of mine and I was lucky enough to be involved in a local effort to look at In-Stream Tidal Power potential for Washington State.
Here is a link to a video showing some of the basic operation of the tool. We worked to integrate some post-processing analysis of 2-D circulation modeling to create both visual (maps) and tabular (graphs) on the fly via the web interface. The work is based on Django, ExtJS, OpenLayers, Mapserver and a few other Open Source GIS projects from OSGeo. Hopefully round 2 funding will happen to continue allow us to continue on with this fun project.

General
So one of the ideas I have been pondering is how WebKit integration into QT (and PyQt) could be leveraged inside of my favorite open source desktop GIS, QGIS. I decided to make a very alpha plugin to show some of the cool possibilities, but I am still looking for a final direction to take the plugin. As always my plugins for QGIS can be found here.
The general idea is to integrate many of the web based mapping API’s that exist into QGIS via a WebKit interface and try to link the QGIS map canvas to actions in those web pages.
Here is a quick video of the initial version of RefMap in action. There are still kinks to be worked out and more providers to add, but it is a good attempt at linking in bi-directional communication between a web page in WebKit and python in PyQt.

RefMap Plugin at work
General
Well, the title might better read “debugging PyQt applications…”, but much of my PyQt foo happens when developing QGIS plugins. In general I am old school… emacs and gdb are my friends. When it comes to developing in PyQt there is one life saving code snip that will make your life much easier:
from PyQt4 import QtCore
import pdb
...
QtCore.pyqtRemoveInputHook()
pdb.set_trace()
This not only sets a trace (breakpoint) in your code, but it stops the PyQt event loop. The call to pyqtRemoveInputHook() is a tasty little tidbit in PyQt to allow for this “stop it in it’s tracks” behavior. This is a must have for debugging PyQGIS or Python based plugins.
Once you are in pdb, you are set to go with interactive debugging:
--Return--
> /home/aaronr/.qgis/python/plugins/refmap/refmap.py(101)__init__()->None
-> pdb.set_trace()
(Pdb) bt
<string>(1)<module>()
/home/aaronr/.qgis/python/plugins/refmap/refmap.py(144)initGui()
-> self.refmap_gui = ReferenceMapWindow(self.iface,flags,self)
> /home/aaronr/.qgis/python/plugins/refmap/refmap.py(101)__init__()->None
-> pdb.set_trace()
(Pdb) print self
<refmap.refmap.ReferenceMapWindow object at 0x8cc6c2c>
(Pdb) print self.iface.mainWindow().windowTitle()
Quantum GIS - 1.1.0-Unstable-trunk
(Pdb)
Happy debugging!!!
GIS Tool Dev, General

Spring pruning begins
Well, its been a while since I have had a chance to even think about blogging. I am currently in-between projects and it has been a great time to catchup on getting my development environment up-to-date, test out some new ideas, and of course prune the orchard! Spring is here and with over 70 trees to get in shape much of the next couple of months will be on a ladder. Another development in the works is trying to start 2 bee hives in the orchard this year.
I have been starting to dive back into QGIS and plugin development. There are some really cool things on the horizon and I will be posting about some of the things I am looking at over the next couple of weeks. Of particular interest to me is the new WebKit integration to QT that happened at QT version 4.4+.
More to come soon…
General