The more tools the better ;-)

02.05.2009 12:53 ·  GIS, Notes  ·  qgis, ftools

Somehow, unnoticed by myself, I have been drawn into the QGIS development process. It all started with a letter asking if I would be interested in a small project (I wrote about it a few days ago). While discussing the project details, I was also asked about the possibility of creating a generic plugin to generate a statistical summary for a vector layer field, something like what ArcMap has. I was also given a link to the forum discussion on this topic.

The point is that QGIS has no standard tools for displaying a statistical summary for a table field. Of course, there is the fTools plugin by Carson Farmer, which has the “Basic statistics” tool, but it works for the whole layer, ignoring the selected features, which is not always convenient. The task seemed interesting to me, so after the work was done, I started to look into this.

First, I studied the fTools code — it (they?) is distributed in source form, like all Python plugins. As I said, the QGIS API is quite well-designed and logical, and the Python language is quite simple and has strict formatting rules, so there were no major difficulties. In the end, using Carson’s code as a base, I wrote my own tool, and also sent Carson a patch adding the ability to get statistics not only on the whole layer, but also on selected features. I also posted a message in a forum thread and sent Oleg a plugin for testing. To be honest, I wasn’t expecting such a response and the subsequent development of events.

First of all, I received a suggestion for improving the plugin from Oleg. His request boiled down to the following: currently the plugin only works with numeric fields, but it would be nice to be able to get statistics for text fields as well (e.g. number of filled/unfilled records, average text length, etc.). I have taken that into account and started working on it.

I soon received a reply from Carson as well. It turns out that he was also thinking about adding the ability to work with selected features, but he has a lot of other projects at the moment, and the process is moving slowly. So the patch came in handy. I wrote to him about statistics on text fields and suggested adding this functionality to fTools, which was welcomed. The last sentence of Carson’s letter is the title of this post.

The post on the forum did not go unnoticed. I got approval and support from the administrator there and got even more involved in the process :-).

And you know, I love it. It is terribly gratifying to feel that you are doing something useful, to realise that your work is needed and does not go unnoticed, and to feel the support and gratitude of complete strangers. Such a contrast to the situation at work.

This is probably the answer to the question raised in the previous post. I’m not used to being idle, and since my knowledge and my experience are not in demand at work, is the only thing left for me to do is to move computers from place to place and explain for the 100th time how to print on A3 sheets? Not to develop or, even worse, gradually degrade? Well, no, there are other more interesting and useful activities! That’s where this incomprehensible urge to participate in various projects comes from!

Or maybe I’m wrong, and it’s just time to move on to the next stage of self-development. This has happened before. I remember how enthusiastically I started learning GIS Geoproject and creating templates for it. As a result, I created a collection of FAQs, wrote several articles, and unexpectedly became a moderator of the support forum. In this connection I would like to thank Evgeny Yasnikov for his help in learning Geoproject, support of my efforts and trust.

Meanwhile, work continues on the statistics plugin. Getting information on text fields (both for the whole layer and for selected features) is already working. And I have received two more feature requests:

The second request has already been fulfilled, now I’m looking into the possibility of plotting graphs with PyQt tools to close the first request. I also slightly refactored the plugin code to allow localisation and added the Ukrainian language. In parallel, I am trying to add to fTools the ability to perform spatial operations not only on the entire layer, but also on selected features.

There is a great lack of time: work and, to a lesser extent, dancing do not leave enough time for everything I would like to do. The situation is compounded by family issues - when there is time, it is not always possible to work on the computer.

⮜ Prev
Next ⮞