Getting Paths with PyQGIS

When writing plugins or scripts it is often necessary to get information about the paths QGIS is using. For example, if we are writing a plugin that uses Python templates to create output based on user actions, we need to know the path to our installed plugin so we can find the templates. Fortunately the API provides an easy way to get at the information; here are a few examples:

Welcome to New QGIS PSC Members

Nominations for the QGIS PSC closed at 00:00 UTC on August 25, 2013 [1]. With only one nominee for each role, the PSC unanimously moved to accept each without election. The QGIS PSC welcomes new members Anita Graser, Richard Duivenvoorde, and Jürgen Fischer. The PSC is now composed of: Chair - Gary Sherman Community Advisor - Otto Dassau Design Advisor - Anita Graser Financial and Marketing Advisor - Paolo Cavallini Infrastructure Manager - Richard Duivenvoorde Release Manager - Jürgen Fischer Technical Advisor - Marco Hugentobler Testing/QA Manager - Tim Sutton The new PSC members begin their terms immediately.

QGIS PSC Call for Nominations

The QGIS Project Steering Committee (PSC) has announced a call for nominations to fill three vacant positions: Design Advisor Infrastructure Manager Release Manager Nominations are open until August 24, 2013. For details on the PSC, vacancies, and how to nominate someone, see the [Call for Nominations August 2013] (

QGIS Back in the Day

Do you remember this? If so, you’ve been using QGIS a long time… OGR and PostGIS support No raster support Three widgets on the Symbology tab No symbology in the legend But you could use it handily on a 640x480 display.

New Version of the QGIS Script Runner Plugin

The Script Runner plugin allows you to manage and execute a collection of scripts in QGIS to automate tasks and perform custom processing. Version 0.6 of Script Runner has been released and includes these changes: Arguments can be passed to a script using keyword arguments Script output is logged to the Script Runner window Script output can be logged to disk Preferences dialog allows control of output and logging options Exceptions in scripts are displayed without interfering with console/logging output Context menu (right-click) to access script functions Edit script function uses system default editor or one you specify in preferences For a basic introduction to Script Runner see this post: Script Runner: A Plugin to Run Python Scripts in QGIS

Littering Your Python Path: The Road to Destruction

Well not quite destruction, but a bit of hair pulling… While working on an update to the Plugin Builder, I encountered a small problem. The Plugin Builder displays the version number in the title bar of its main window. After bumping the version number to 1.8.4 in all the requisite places, it still showed 1.8.3 when testing. Using grep on all the source files revealed no instance of 1.8.3 in any file.

QGIS Gains a Gold Sponsor

The Quantum GIS (QGIS) project is happy to announce that the Asia Air Survey Co., Ltd (AAS), a Japanese international consulting company, has become a Gold Sponsor. AAS has committed to providing 9,000 EUR (~$11,000 US) each of three years, beginning in November 2012. The AAS sponsorship is yet another indication that QGIS is a mature and stable project which continues to provide innovative open source GIS software. The QGIS Project Steering Committee (PSC) wishes to thank AAS for their continuing commitment.

QGIS Is Ten Years Old

It was ten years ago, on July 19, 2002, that QGIS was officially unveiled. That first release was primitive, supporting only PostGIS layers and having little in the way of navigation controls. Invoking the open source mantra of “release early and release often,” I announced it on Freshmeat and waited. Slowly it began to attract attention—not all of it positive. Some questioned why I was starting a new open source GIS project when there were others I could join.

What's New in QGIS Plugins

Here’s a summary of recent additions and updates to plugins in the QGIS repository. FlowMapper (0.1.1) - Generates flow lines between discreet nodes for depicting spatial interaction data (e.g. migration). Query By Example (0.2) - Select features by location. Item Browser (1.6.0) - Browse a multiple selection with auto-zooming to feature and an option to open feature form. Custom Launcher (1.1.0) - Customize your own actions to launch your preferred apps or commands within QGIS.

QGIS Plugin of the Week: qNote

This week we look at a newly arrived plugin named qNote. This plugin allows you to create a note and store it in a QGIS project file. When the project is loaded, the note is restored and can be viewed in the qNote panel. This little plugin provides a way to attach metadata to a project. Things you might want to include in a note are: Content of the project Purpose Area of interest Where the data came from Who created the project This information can be helpful when sharing a project or when you forget what you did six months after the fact.

Getting Support for QGIS

The QGIS project has a number of support channels. Like many open source projects, these are loosely coupled. Recently the forum was made read-only and this has prompted a number of questions and concerns about how to receive support. This post outlines the ways in which you can get your questions answered. Home Page The QGIS home page has links to all the documentation and community resources. The navigation panel on the left has links to both the Community resources and the manual.

QGIS Forum Is Closed---What Do You Think?

The forum ( has been closed for new registrations and marked read-only. Users have been encouraged to use instead. If you have an thoughts on the closure, good, bad, or otherwise, please comment.

Script Runner: A Plugin to Run Python Scripts in QGIS

Following up on my last post, Running Scripts in the Python Console, I created a plugin to simplify running scripts: The Script Runner plugin allows you to add your scripts to a list so they are readily available. You can then run them to automate QGIS tasks and have full access to the PyQGIS API. In addition, you can view information about the classes, methods, and functions in your module as well as browse the source:

QGIS: Running Scripts in the Python Console

The QGIS Python console is great for doing one-off tasks or experimenting with the API. Sometimes you might want to automate a task using a script, and do it without writing a full blown plugin. Currently QGIS does not have a way to load an arbitrary Python script and run it.[1] Until it does, this post illustrates a way you can create a script and run it from the console.

Using the QGIS Raster Calculator

The raster calculator allows you to perform mathematical operations on each cell in a raster. This can be useful for converting and manipulating your rasters. Operators include: Mathematical (+, -, *, /) Trigonometric (sin, cos, tan, asin, acos, atan) Comparison (<, >, =, <=, >=) Logical (AND, OR) To perform operations on a raster or rasters, they must be loaded in QGIS.