Blog

Here I post my thoughts, QGIS tips and tricks, updates on my QGIS-related work, etc.

Getting started with openModeller

02.05.2011 10:00 ·  GIS  ·  openmodeller, howto

Let’s take a look at openModeller, a flexible, robust, open source and cross-platform framework for running ecological niche modelling experiments.

Read more ››

Building TinyOWS on Windows with MSVC

30.04.2011 10:59 ·  GIS  ·  tinyows, howto

A small tutorial on how to build the current version of TinyOWS (the so-called trunk) under Windows XP Professional using Microsoft Visual C++ 2008 Express Edition and libraries from OSGeo4W.

Read more ››

GDAL raster calculator

28.04.2011 17:30 ·  GIS  ·  gdal

Having a raster calculator in QGIS is cool, but if you need to process a lot of rasters, it won’t be much help. There is no batch mode in the calculator (neither in the plugin nor in the QGIS core). Well, there is an entry about it in my TODO. But knowing that won’t help if you have hundreds of images for which you need to calculate, e.g., NDVI, or perform pixel replacement by a tricky condition.

This is where GDAL and Python come to the rescue. It literally takes 10 minutes to write a script, as there is nice and detailed documentation. But again, writing almost identical scripts for every task is not very practical.

Let me tell you a little secret. GDAL 1.8.0 has a wonderful tool, modestly named gdal_calc.py. This small (about 300 lines) Python script works with rasters of the same size (no check for mismatching CRS is performed) and supports basic arithmetic and logical operations. It is easy to use:

# sum of two rasters
gdal_calc.py -A input1.tif -B input2.tif --outfile=result.tif --calc="A+B"
# average of two rasters
gdal_calc.py -A input1.tif -B input2.tif --outfile=result.tif --calc="(A+B)/2"
# difference of raster bands
gdal_calc.py -A input.tif --A_band=1 -B input.tif --B_band=2 --outfile=result.tif --calc="A-B"

It accepts up to 26 images as input, which should be sufficient for most use cases. As you can see from the examples, there is support for parentheses, you can access individual bands, and the console nature makes it easy to use the script for batch processing. It still lacks some features, but even in its current state, it is a great console calculator.

Selection results for GSoC 2011

25.04.2011 16:28 ·  GIS  ·  qgis, gsoc

The list of selected student projects for GSoC 2011 has been published, QGIS received three projects:

The list of all accepted OSGeo projects can be found here (filter by the “Organisation” field).

QGIS hackfest 2011 (Lisbon)

18.04.2011 10:17 ·  GIS  ·  qgis, meetings

The 5th QGIS developer meeting, which according to the QGIS Wiki gathered 28 people in Lisbon (Portugal), is coming to an end. It is time to summarise the results and share impressions.

Unfortunately, I was not able to attend in person and had to participate virtually again.

As the code and strings are currently frozen, people have mainly been fixing bugs and cleaning up the bug tracker. No new functionality (at least visible to normal users) has been added.

Most of the first day was spent getting things up and running, with more or less active work only starting on Friday evening. Saturday, however, was a real blast: in addition to closing tickets and fixing bugs, several presentations were given:

We also discussed many other topics, including migrating to Git, starting a new plugins repository, further development of QGIS, and redesigning the user interface.

Some numbers. At the time of writing: 64 issues closed, 59 commits made, 26 new issues opened. By the way, the bug #7 has been fixed, and the place of the oldest issue now belongs to #40.

In my opinion, this hackfest was a bit sluggish and not as lively as the previous ones. I hope that the feature freeze is to blame and that the next meeting (in autumn in Switzerland) will be more active.

Cards

07.04.2011 09:41 ·  Notes  · 

I was tidying up and found some long-forgotten cards in my drawer

MtG cards
MtG cards

Now I don’t even know what to do with them. It’s a shame to throw them away, but there’s no time to play and no one to play with.

Jonathan Livingston Seagull

27.03.2011 16:34 ·  Notes  ·  books

A few days ago, at the suggestion of a friend, I read “Jonathan Livingston Seagull” by Richard Bach. It’s a wonderful thing, I’m still under the impression.

Highly recommended if you haven’t read it yet.

How do I do that in QGIS

21.03.2011 10:37 ·  GIS  ·  qgis

A long and very active discussion and comparison of the functionality of QGIS and Manifold has led to the creation of another page on the QGIS wiki: “How to do that in QGIS”. Here we will publish step-by-step instructions for solving various tasks in the latest version of QGIS.

It is intended that these instructions will supplement the existing documentation and replace outdated HowTo’s scattered around the web. Everyone is invited to contribute content.

Raster reprojection in QGIS

08.03.2011 17:36 ·  GIS  ·  qgis

What many of us have been waiting for has finally happened: Radim Blazek has just merged the raster_providers branch into trunk. Raster reprojection is now a reality.

fTools cleanup

08.03.2011 12:10 ·  GIS  ·  qgis, ftools

QGIS is evolving fast: The API is extended, new features appear, and functionality that was previously implemented as plugins is added to the core. This was the case with the raster calculator, and now it is the turn of fTools.

For those who don’t know, fTools is a set of tools for vector data processing (analysis, management, and geoprocessing). Originally developed as a plugin, at some point it was integrated into QGIS (menu “Vector”, and earlier “fTools”).

After merging code from the table_join branch into the main development tree, the “Join attributes” tool is no longer needed; the “Export to new projection” tool is successfully replaced by the “Save as” functionality. These tools have already been removed, as well as the About dialogue box and help files.

There is an ongoing discussion about removing the “Export/Add Geometry column” (you can get area, perimeter and coordinates using the Field Calculator) and “Select by Location” tools (there is a more powerful Spatial Query core plugin).