Reprojected

A warped look at spatial...

Debugging QGIS Plugins…

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!!!

Back in the Saddle…

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…

Moving On…

Moving on... Well, as of July 8th I have made the transition out of Ecotrust and now am working on a contract basis full time. I am very excited about the move and look forward to continuing on with some of my ongoing contract work as well as starting to hit the pavement and drum up some new work. More to come as I get my feet on the ground and back up and running!

LinuxFestNW 2008 - Another Great Event!

LinuxFestNW

I had the privilege of giving a talk at LinuxFest Northwest this year… and what a cool event this is. We had a great room full of people interested in Geospatial technology, some great questions and I think some genuine interest from participants that could lead to some folks going home and hacking away with some mapping. Great job to the organizers of the event and looking forward to helping make LinuxFestNW 2009 an even bigger and better event!

Here are the links to my talk:

PDF 4.5M ODP 8M PPT 8M

(UPDATE 042808): They have now posted a link to the video of my talk:

http://www.ustream.tv/recorded/377931

CUGOS - For those local to the Pacific Northwest, come visit us and make some local Geospatial friends!!

QGIS on the Eee…

Well, I got Ubuntu 7.10 installed on an 8 gig SDHC card and away I go…

4.5 gigs used for the base Ubuntu system as well as the base GIS software:

1) Proj4 (4.6.0) 2) GDAL/OGR (1.5.0) 3) GEOS (3.0.0) 4) Postgresql (8.2.5) 5) PostGIS (1.3.2) 6) QT dev environment (4.3.2) 7) QGIS svn (0.9.2)

What do you get? Well, an ultra portable GIS workstation weighing in at less than 2 lbs that is very fun!

Check out a video:

http://media.reprojected.com/presentations/Videos/eee_qgis_install/eee_qgis_install.html

The New Eee….

Oh Yeh, this post is being written from my new asus eee pc… 7 inches of cool gadget. I dont think I have ever used a machine this small… so cool.

$399 for the pc, $19 for 1 gig RAM upgrade, $21 for a 4 gig SDHC card and there you have a pretty fun machine.

Here are some pics…

RAM installNew RAM going in…

QGIS

QGIS running from a remote server!

Size Size compare with an IPOD…

Well, as I start to install more stuff I will post more info. So far I am very happy and excited to be playing with the eee

Getting QGIS to Install on Windows and Support Python Apps…

So here are the simple (kind of) steps as of today to get a windows install of QGIS working that supports PyQt and the python bindings to QGIS… all with out having to compile anything:

1) Make sure you have Python 2.5 or newer installed on your machine… if you don’t have it you can download it from HERE (official) or HERE (my archive).

2) Install PyQt4.3.1 from HERE (official) or HERE (my archive)

3) Download and unpack THIS zip file. Copy the PyQt4 directory unpacked from the zip into your Python 2.5 site-packages directory. Make sure to save the old PyQt4 directory in the site-packages by renaming it in case something goes wrong!

4) Download and install QGIS from HERE (my archive). This is the latest release candidate from what_nick that is based on the Qt4.3.1 series.

5) In the QGIS install there are some GRASS documentation files that are missing and can cause warning dialogs to pop up when using the GRASS toolbox. You can unzip the contents of THIS archive into the QGISDIR\grass\docs\html directory to stop the warnings.

You can still follow the instructions HERE to build QGIS yourself and play to your hearts content, but I know that there are many windows users out there that really would just like to get moving without the hassle of compiling. This post is for you.

FOSS4G 2007… Back Home

Well, it was a great week in Victoria BC for this years FOSS4G conference! Besides the great chance to hang out with the OS GIS community, it was a great chance to take a look at what is hot in our field. Keep checking back to the FOSS4G web site as many of the presentations as well as video from the plenaries are being uploaded.

My talk on the use of PyQGIS (Python bindings to QGIS) for development of some stand alone desktop tools went well. My powerpoints are here (6 meg). I even have a couple of snapshots of giving the talk (thanks to Gary Sherman).

Gary Sherman gave a great workshop on Monday. He has posted the slides and ISO image of the live CD on the QGIS blog. Here are a couple images that show Gary laying it out and some of the students soaking it in. I also had a voice recorder and have made streaming mp3’s of the session available at the following links:

Clip #1 (streaming or mp3)

Clip #2 (streaming or mp3)

Clip #3 (streaming or mp3)

Clip #4 (streaming or mp3)

Clip #5 (streaming or mp3)

Clip #6 (streaming or mp3)

We also had a great QGIS BOF session which was well attended by a diverse group of developers, users, and interested newbies. All in all I think QGIS had a great showing at FOSS4G and am looking forward to pushing many of the ideas talked about there forward.