QGIS Planet

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.

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.

Sherman's Law

In any sufficiently aged bureaucracy, process overshadows product.

I Love Linux

$ uptime 20:20:56 up 434 days, 15:31, 2 users, load average: 2.32, 0.89, 0.53

QGIS Workshop at FOSS4G2007 - A Done Deal

Well, the QGIS workshop at FOSS4G2007 is history. We had a capacity crowd and covered a lot of ground in a short 3 hours. Rumor is there are some pictures and heaven forbid, audio from the workshop floating around. Maybe they’ll surface at some point this week. I have a few LiveCDs left over and some of the coveted QGIS carabiners. If you run into me at the conference and want either, just ask.

QGIS Development with Plugin Builder and pb_tool

The Plugin Builder is a great tool for generating a working plugin project that you can customize. One of the main tasks in the development cycle is deploying the plugin to the QGIS plugin directory for testing. Plugin Builder comes with a Makefile that can be used on Linux and OS X to aid in development. Depending on your configuration, the Makefile may work on Windows. To help in managing development of your projects, we’ve come up with another option—a Python tool called pb_tool, which works anywhere QGIS runs.

Where's my .qgis3 Folder?

There’s been several posts to GIS StackExchange along the lines of: Where’s my .qgis3 folder? Prior to QGIS 3, the .qgis/.qgis2 folder was found under your home directory. At version 3, the folder has moved to a more standard profile location for your operating system. There are a couple of ways to determine where the folder is located: Use the Settings->User Profiles->Open active profile folder menu item Use QgsApplication.qgisSettingsDirPath from Python or the console Here are the “standard” locations for Linux, Mac, and Windows, as found under your HOME directory:

The Leopard Limps a Bit

I use my MacBook as my “command center”, connecting to the other machines I need to work on using ssh and Nx. After a bit of tuning, I had this working nicely under Tiger. Enter Leopard. I upgraded my machine rather than a clean install — I’m in the middle of too many things to start from zero. Being cautious, I waited a few days to see what kind of issues might arise (such as the Blue Screen of Death).

Quick Guide to Getting Started with PyQGIS 3 on Windows

Getting started with Python and QGIS 3 can be a bit overwhelming. In this post we give you a quick start to get you up and running and maybe make your PyQGIS life a little easier. There are likely many ways to setup a working PyQGIS development environment—this one works pretty well. Contents Requirements Installing OSGeo4W Setting the Environment pb_tool Working on the Command Line IDE Example Workflow Creating a New Plugin Working with Existing Plugin Code Troubleshooting

Spatial Galaxy

This site aims to bring out some of the latest and sometimes not-so-greatest happenings in the GIS world. We’ll focus to large extent on Open Source software but hopefully mix it up to keep things interesting. We’ll explore things from the new and exciting to the dull and mundane. There are a lot of GIS/Spatial sites out there. Hopefully we can provide some content of interest and you will add this one to those you visit frequently.

Faking a Data Provider with Python

QGIS data providers are written in C++, however it is possible to simulate a data provider in Python using a memory layer and some code to interface with your data. Why would you want to do this? Typically you should use the QGIS data providers, but here are some reasons why you may want to give it a go: There is no QGIS data provider The generic access available through OGR doesn’t provide all the features you need You have no desire to write a provider in C++ No one will write a C++ provider for you, for any amount of money If you go this route you are essentially creating a bridge that connects QGIS and your data store, be it flat file, database, or some other binary format.

QGIS Plugin of the Week: Points to Paths

This week we highlight the Points to Paths plugin, a handy way to convert a series of points into line features. This plugin lets you “connect the dots” based on an common attribute and a sequence field. The attribute field determines which points should be grouped together into a line. The sequence field determines the order in which the points will connected. The output from this plugin is a shapefile.

PyQGIS Resources

Here is a short list of resources available when writing Python code in QGIS. If you know of others, please leave a comment. Blogs/Websites In alphabetical order: GIS StackExchange Kartoza Linfiniti Lutra Consulting Nathan Woodrow Nyall Dawson Twitter #pyqgis Documentation Choose the version to match your QGIS install PyQGIS Cookbook QGIS API Example Code Existing plugins can be a great learning tool Code Snippets in the PyQGIS Cookbook Plugins/Tools Script Runner: Run scripts to automate QGIS tasks Plugin Builder: Create a starter plugin that you can customize to complete your own plugin Plugin Reloader: Allows you to reload a plugin from within QGIS pb_tool: Tool to compile and deploy your plugins Books PyQGIS Programmers Guide Geospatial Desktop: GIS Scripting (PDF)

Using the QGIS Plugin Builder

The Plugin Builder allows you to quickly create a skeleton Python plugin by generating all that boring boilerplate that every plugin requires. Here is a short video showing how to create, compile, and install a new plugin. For more information, see QGIS Workshop Documentation and the PyQGIS Cookbook.

History of QGIS Committers

Using the git log leading up to the 1.7 release (June 2011) I put together a graphic that shows the growth of committers working on the project. In 2002 we had two people (me alone up until October). You can see significant jumps in developer interest in 2004 and 2008: In 2004 there were a number of releases that added significant functionality Following an announcement at FOSS4G 2007 in Victoria we released 0.

Evolution of QGIS

An interesting visualization of QGIS development over the last eight years: http://woostuff.wordpress.com/2011/01/03/generating-a-gource-source-commit-history-visualization-for-qgis-quantum-gis/

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

The forum (http://forum.qgis.org) has been closed for new registrations and marked read-only. Users have been encouraged to use http://gis.stackexchange.com instead. If you have an thoughts on the closure, good, bad, or otherwise, please comment.

Desktop GIS - the book

The Pragmatic Programmers have announced the upcoming Desktop GIS title.

Upgrading PostGIS in a Database with Large Objects

Following the instructions for a “hard” upgrade in Chapter 2. Installation of the PostGIS manual results in large objects not being restored to the database. If you create a dump using pg_dump -Fc –oids and then use the postgis_restore.pl script, the oids will be restored but not the large objects. This is not really a PostGIS issue, it can happen when dealing with any PostgreSQL database. To remedy this situation I found that the pg_dumplo utility has the answer.

Back to Top

Sustaining Members