Tag: Qgis

Creating a raster composite from separate bands in QGIS

02.06.2011 13:24 ·  GIS  ·  qgis, howto

Often, novice QGIS users who have downloaded satellite images from Earth Explorer or other sources ask themselves: “What do I do with these files, and why do I see a black rectangle or a black and white image instead of a nice color image?” The thing is that satellite images are usually distributed as separate files, each of which corresponds to a specific radiation range (channel). To get a beautiful and informative image, these channels (often called bands) should be combined, and then, depending on the task, we need to choose the right band combination.

In this post I will show you how to do this in QGIS. I will assume that QGIS is already installed and that you already have a set of rasters that make up a multi-band image, such as a Landsat scene.

Read more ››

PyQGIS CookBook translation

01.06.2011 17:40 ·  GIS  ·  qgis

I finally completed and published my translation of the PyQGIS Developer CookBook, a reference guide for Python developers who want to use the QGIS libraries. It is available as an online version and as a PDF for offline use.

The translation is not perfect (as my English is far from perfect) and will be improved gradually. I will keep the translation in sync with updates to the original PyQGIS CookBook.

Now I can start translating another manual, especially since I already have a candidate in mind. I won’t tell you which one. Out of spite. I will only say that it is also related to GIS.

Using OpenStreetMap data in QGIS

19.05.2011 16:41 ·  GIS  ·  qgis, tips

Mayeul Kauffmann has done a great job comparing different ways to use OpenStreetMap (OSM) data in QGIS. He has also written a detailed guide on how to use OSM data to create beautiful, high-quality maps with routing support.

Here is a video demonstrating the use of QGIS and osm2postgresql.

QGIS Browser and interface customization

15.05.2011 08:35 ·  GIS  ·  qgis

Those interested in QGIS development are probably aware that at the last developers’ meeting, among other things, Martin Dobias and Radim Blazek presented the QGIS FileBrowser application for data management.

QGIS Browser
QGIS Browser

QGIS FileBrowser is based on the QGIS libraries. It supports the same vector and raster formats as QGIS and can also work with WMS servers (information about connections is taken from QGIS settings). The functionality is still quite poor, right now you can:

The source code of the application is available in the QGIS repository, in the browser-and-customization branch.

This branch also contains Martin and Radim’s work on a QGIS interface customisation tool. The new dialogue allows you to hide unnecessary widgets and save these settings to a file for use on other machines.

QGIS UI customisation tool
QGIS UI customisation tool

Not only can you hide individual buttons on toolbars and toolbars themselves, but literally anything can be customised. For example, you can remove menu items, hide individual tabs, or dialogue controls.

New QGIS code repository

09.05.2011 13:29 ·  GIS  ·  qgis

What has been talked about for a long time has happened. The QGIS project has officially changed its version control system: the code has been moved from SVN to GIT. The migration process is described in detail in Tim’s blog.

This is the second global migration. A few years ago, we migrated from CVS to SVN, and that was accompanied by the migration of the repository and bugtracker from SourceForge to the OSGeo infrastructure. The current migration is even more global: in addition to the migration to GIT, we have a repository migration to GitHub (more on that below), a bug tracker change (Trac will be replaced by Redmine), and we will also create a new plugin repository integrated with the bug tracker.

The new official repository is on GitHub — qgis/QGIS. As git is a distributed version control system, access to the main repository will be restricted to a few developers (i.e., many developers who previously had access will lose it). Everyone else can work in their own repositories and either submit patches (created using git format-patch) or send a pull request (if your repository is also on GitHub).

Now a bit of grumbling. The move to Git is a good step, but I personally don’t like the fact that the official repository is on GitHub. I don’t understand why the repository can’t be on the OSGeo servers. The rest of the infrastructure will be there anyway, so everything will be interconnected, and a single login will be used to access all services (bugtracker, svn, ftp…). Now it is not very convenient, and there is also a dependency on a third party.

P.S.: despite the fact that version 1.7 has already been branched, the release will be delayed until the end of the project’s infrastructure update. The release branch is accepting fixes that do not affect strings, and package maintainers can already prepare test builds and make the necessary changes.

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.

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).

New QGIS plugins respository

05.03.2011 18:04 ·  GIS  ·  qgis

The new QGIS plugin repository, which was discussed at the latest developer meeting in Wrocław, is now available for testing at https://plugins.qgis.org. Everyone is welcome to try it out, login with your OSGeo ID. Any problems should be reported to https://github.com/qgis/QGIS-Django.

There is also a separate bug tracker for plugins, which can also be accessed using the OSGeo ID.

More information about the new plugin repository can be found on the QGIS Wiki.

Contributing to QGIS using git-svn

03.03.2011 20:23 ·  GIS  ·  qgis

At the last QGIS developer meeting in Wrocław we discussed the migration from SVN to Git. There was even a small workshop on using Git at the hackfest. The final decision on this topic has not yet been made, but it will be discussed again at the next meeting in Lisbon.

For those who want to try Git in action, there are several QGIS mirrors on GitHub (one, two) that can be used for development. Gary Sherman has written a good post on how to do this using git directly.

Another option is to use git-svn. This eliminates the need to create an account on GitHub and is a good option if you just want to try Git but still want to use your SVN working copy for a while. This is the option I chose.

First, we need to obtain sources, starting with some revision

git svn clone --revision 15000:HEAD https://svn.osgeo.org/qgis/trunk/qgis qgis

If necessary, revision 15000 can be replaced with another revision. Now you can cd into the qgis directory and use all the features of git: create local branches, make and commit changes, etc. When everything is ready to be committed back to trunk, use the following command

git svn dcommit

To synchronise with the repository, use

git svn rebase

I’ve already made my first commit this way.