Blog

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

SQL Anywhere support in QGIS

16.12.2010 06:28 ·  GIS  ·  qgis

David DeHaan has developed a plugin and data provider for working with Sybase SQL Anywhere spatial databases in QGIS. The new functionality is available as of r14918, and the capabilities of the new provider are very similar to those of the PostGIS and SpatiaLite providers.

To build and test this provider, you will need:

You can find out more about SQL Anywhere’s support for spatial data here.

It would be interesting to test and compare the functionality and performance of PostGIS, SQL Anywhere and Oracle Spatial in a real-world scenario.

QGIS Plugin Manager with icons

13.12.2010 17:19 ·  GIS  ·  qgis

This is what the QGIS Module Manager looks like after adding icons to plugins.

QGIS Plugin Manager with icons
QGIS Plugin Manager with icons

News from the QGIS front

13.12.2010 16:04 ·  GIS  ·  qgis

Tim Sutton gave a good overview of some new features in QGIS: a graphical rule editor (which helps to create rendering rules) and complex styles for vector objects (fill, outline and centre marker).

Yesterday, Martin Dobias added icon support to the QGIS plugin manager. Among other things, this will make the display of available plugins more user-friendly and make it easier to navigate through the large list. However, to take advantage of this feature, plugin authors will need to make small changes to their code (add two lines). In the future, after the launch of the new plugin repository, it is planned to add icon support to the plugin installer.

Another interesting news - kCube Consulting has decided to help the QGIS project by assigning one of their programmers to work on QGIS for 6 months. You can read more about this on Tim’s blog, and visit the wiki to check out the list of possible tasks and leave your own suggestions.

/me put on “Sax & Sex” and began to add icon support to his plugins and those he could reach.

QGIS vs. MapInfo

07.12.2010 14:54 ·  GIS  ·  qgis, mapinfo

A small but interesting comparison of QGIS and MapInfo https://woostuff.wordpress.com/2010/12/06/mapinfo-and-qgis-an-overview/.

QGIS 1.6.0 "Copiapó"

29.11.2010 14:56 ·  GIS  ·  qgis, release

QGIS 1.6 “Copiapó” has been released. This version contains over 177 bugfixes and many improvements. Among the most interesting changes are:

An updated User Guide is also available (English only for now).

Migrating from SVN to Git

25.11.2010 19:03 ·  Notes  ·  git, svn

After reading manuals and smart books, I decided to migrate some of my local SVN repositories to Git. It would seem to be a simple process, but no… there were some problems.

I’m running DeepStyle 3.1 (which is basically Slackware 12.2). Git 1.6.1.3 was installed with the system.

So I created a directory for the project, ran git-svn and got a “command not found” error. The first problem turned out to be quite simple, you have to use git-svn (at least on Slackware), i.e. without the hyphen. Strange, almost all articles refer to git-svn

OK, I tried to run the correct command and got a scary error message

Can't locate Error.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i486-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/5.8.8/i486-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i486-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/vendor_perl/5.8.8/Git.pm line 93.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Git.pm line 93.
Compilation failed in require at /usr/bin/git-svn line 45.
BEGIN failed--compilation aborted at /usr/bin/git-svn line 45.

This one took a bit longer. It turned out that I needed to install additional Perl modules and the corresponding bindings for SVN. To install the modules, use the following command (internet access required):

sudo cpan Alien::SVN Error Term::ReadKey

Wait for the installation to finish. Now download subversion-bindings SlackBuild. Extract the archive, change the SVN version in the script to the one you are using and run it. Wait for it to compile and then install the package that was created. Everything should be working now.

The actual repository migration is quite simple (at least in my case). First, we need to match the usernames in SVN and Git, so we create a text file with the following content (of course, the names should be real):

jdoe = Jon Doe
tomm = Tom Morton

Then create a temporary directory for the project, initialise the Git repository, and import the sources from SVN:

mkdir project_tmp
cd project_tmp
git svn init http://svn.somehost.net/project --no-metadata
git config svn.authorsfile ~/tmp/svn_authors
git svn fetch

The --no-metadata switch in the third command is needed to ignore SVN-specific information. The fourth command creates a mapping between Subversion and Git usernames using a previously created file. The last command performs the import of the source code. The import process will take some time (depending on the size of the repository and the number of commits). Once it has finished, you can clone the temporary repository to get rid of any garbage left behind by SVN.

cd ..
git clone project_tmp project

MergeShapes update

22.11.2010 17:27 ·  GIS  ·  qgis, plugins, mergeshapes

I decided to improve my MergeShapes plugin a bit. I added encoding selection when opening files, shapefile geometry type selection and reworked the merge algorithm. Now, the final attribute table contains all unique fields from all input files, which means you can merge files with different attribute tables. The only missing bit is a setting for the default encoding of input data.

There are plans to improve DPSimplify, Statist and RasterCalc, but I don’t know how it will go yet.

I’ve also started to slowly learn Git, or rather to organise and deepen my fragmentary knowledge. I want to try out this VCS in real tasks, as there is already a Git mirror of the main QGIS SVN repository.

QGIS hackfest 2010 (Wrocław) recap

16.11.2010 12:43 ·  Notes  ·  qgis, meetings

Based on the report published on the Linfiity Geo Blog and my own impressions.

The 4th QGIS hackfest, held from 11 to 15 November in Wrocław, Poland, attracted 29 participants (28 people and one dog). All participants did their best to make QGIS even better. A lot was accomplished in four days: hundreds of commits, demonstrations of new features, and many productive discussions. The meeting was organised by Paweł Netzel with the help of Milena Nowotarska, Robert Szczepanek, Maciej Sieczka and Borys Jurgiel and took place at the Department of Climatology and Atmospheric Protection of the University of Wroclaw.

My contribution — numerous improvements to the fTools plugin. When using the “Merge shapefiles to one” tool, it is now possible to select not only a folder, but also individual files. The “Simplify geometry” tool has been redesigned: I added a customisable simplification threshold and the ability to simplify the whole layer or only selected features; simplification can be done “in place” or by creating a new shapefile; “in place” simplification supports undo/redo; at the end of the simplification plugin shows a report about the total number of vertices in a layer before and after simplification.

In the following, you will find an overview of the most important topics that were discussed during the hackfest as well as most notable changes.

Plugins

One of the most heated discussions, led by Borys Jurgiel and Martin Dobias, was about plugins. We decided to review the plugin management system in particular:

Development of the new repository has already started, and Giuseppe Sucameli has modified the QGIS API to add new top-level menus (“Vector”, “Raster” and “Database”) for the corresponding plugin types.

Threading branch

Martin Dobias presented the threading branch. This branch is the result of his work during the Google Summer of Code on improving the performance of QGIS. Martin has done a lot of work to speed up layer rendering and improve the overall performance of QGIS, and has also submitted several patches to related projects, in particular GDAL.

Graphical User Interface (GUI)

Another discussion was focused on the user interface. We tried to identify places where GUI improvement or revision is needed, and fixes various inconsistencies in QGIS dialogs. One of our goals is to make QGIS usable on small screen devices such as netbooks. You can already see some of the results by downloading the nightly build or building QGIS yourself.

Globe plugin

Pirmin Kalberer presented his work on creating a 3D globe in QGIS. The globe is linked to the QGIS map canvas, so that all vector and/or raster layers displayed on the map are automatically displayed on the globe. In addition, the globe is able to create a “true 3D” when using stereo glasses.

Labelling

Marco Hugentobler has worked on improving data-defined labels. It is now possible to add fields to the layer attribute table to store the x and y coordinates of labels, and when labels are enabled, they will be placed at the given position. If labels have no associated coordinates, they will be placed automatically. The “feature” of this tool is that the labels can be moved, and the attribute table will be updated with new coordinates.

Attribute table management

Jürgen Fischer has improved attributes management. For example, when merging multiple features, you can now select values for each field of the final feature from the list of values of the original features. He has also added support for default attribute values, which is particularly useful when digitising objects.

Snapping

Cédric Mori has made the snapping options more accessible. His patch makes it possible to use snapping options dialogue as a floating panel, making it easier to access the options while digitising.

PostGIS versioninig

Horst Düster has continued to improve his plugin for versioning PostGIS databases. The plugin adds support for SVN-like functionality to PostGIS, for example allowing multiple users to edit the same table at the same time, get specific changes and resolve conflicts.

User Guide update

Anne Ghisla and Otto Dassau have done a great job updating the User Guide and describing many of the new features of the upcoming QGIS 1.6.0.

Certification

One of the discussions focused on the possibility of creating a certification programme for QGIS users. We want to create standards and a centralised certification programme so that the quality of training in Poland will be the same as the quality of training in South Africa.

Workshops

There were several workshops on QGIS plugin development for students and new community members.

Offline editing

Mathias Walker has been working on improving his “Offline Editing” plugin, which recently became part of QGIS. The plugin allows you to export layers from a PostGIS database for offline use (e.g. field data collection), edit them and then synchronise the changes with the main database.

Migration to Git

Another discussion was about using the Git version control system in the project. Pirmin Kalberer gave an interesting overview of Git and how it can be used with SVN. Perhaps some developers will now use Git, but there are no plans to change the version control system for the time being.

PostGIS plugins

There are several plugins for working with PostGIS databases, and they have partially overlapping functionality. We discussed the plans and actions needed to merge these plugins into one tool. It was also decided to create a separate menu for tools that work with databases.

GRASS

Paolo Cavallini and Giuseppe Sucameli worked on organising the list of GRASS modules and improving the user interface of the GRASS plugin.

Some photos from the hackfest.

QGIS hackfest 2010 (Wrocław)

12.11.2010 08:58 ·  Notes  ·  qgis, meetings

The 4th QGIS Developers Meeting (aka QGIS Hackfest) has started.

Online translation is available at ustream.tv. You can also chat with participants, discuss various topics by joining the #qgis IRC channel on freenode.net.

Bravo

11.11.2010 10:32 ·  Notes  ·  bravo, dance

When I was young and handsome, I used to dance. Not professionally, but quite seriously. At least, our team has been given the title of “folk”, and not so long ago it was confirmed.

I’ve uploaded some photos to Picasa, and below is one of my favourite performances. I apologise in advance for the quality: this is amateur video, and the lighting on the stage is terrible (thanks to the Palace’s sound/lighting director).