Category: GIS

matplotlib for OSGeo4W

15.06.2009 08:24 ·  GIS  ·  osgeo4w, matplotlib

There is a Python extension called matplotlib. It is very convenient and functional, allowing you to easily create and display various graphs and charts. It generates high-quality images and supports adding captions, including various special characters. I used this extension when I needed to output a histogram in my plugin.

That’s why I decided to create a package for the OSGeo4W installer. I read the instructions, experimented on a virtual machine, and here is the result: matplotlib is now available via the OSGeo4W network installer.

PostGIS vs ArcSDE: raster load speed test (preparation)

09.06.2009 12:03 ·  GIS  ·  postgis, wktraster, arcsde

Recently, PostGIS has received support for raster data and the ability to load images directly into the database through the WKTRaster extension. This is one of the features that previously fell short compared to ArcSDE.

As soon as raster support became available, it was natural to want to compare PostGIS and ArcSDE. When I saw a forum topic about it, I immediately volunteered to help.

Today I spent most of the day preparing: I downloaded source archives, read installation instructions, and compiled all necessary components. There were a few pitfalls: first, PostgreSQL 8.3.7 refused to compile, saying that utf8_and_shift_jis_2004.o could not be built. After some investigation, I found that the following files are missing

../src/backend/utils/mb/conversion_procs/utf8_and_shift_jis_2004/utf8_and_shift_jis_2004.c
../src/backend/utils/mb/conversion_procs/euc_jis_2004_and_shift_jis_2004/euc_jis_2004_and_shift_jis_2004.с

More precisely, they are present, but not in the src directory where the compiler looks for them, but in a completely different directory. After moving these files to the correct directory, the compilation was successfully completed. I described the compilation process in detail in the previous post.

All other components were compiled without any issues, the only trouble was that the archive with the SVN version of PostGIS turned out to be “broken”, so I had to re-download it.

The test data set has been downloaded, and all the components have been built. Now I am waiting for the test instructions.

To be continued…

Compiling PostgreSQL, PostGIS and WKTRaster on Windows

06.06.2009 15:53 ·  GIS  ·  postgis, wktraster, howto

To some extent, PostGIS can be seen as a free, open-source alternative to ArcSDE, but until recently it lacked support for raster data. Lately, a WKTRaster project has been started to fill this gap and develop an extension to support raster data in PostGIS. Perhaps in the near future, PostGIS will be able to offer its users functionality comparable to ArcSDE.

There was an idea to compare the speed of loading a large raster in ArcSDE and PostGIS. Since there are no ready-to-use binary builds of WTKRaster, it is necessary to build and configure the PostgreSQL + PostGIS + WKTRaster bundle before performing any tests.

We will build the latest stable version of PostgreSQL (8.3.7 at the time of writing), the latest SVN version of PostGIS (1.4.0SVN at the time of writing), and the latest SVN version of WKTRaster (0.1.6SVN at the time of writing). This post is based on the official build instructions and blog posts by Mateusz Loskot.

Read more ››

About dancing and OSGeo4W

05.06.2009 16:15 ·  GIS, Notes  ·  osgeo4w, dance, bravo

It’s hot, although even during the day the temp doesn’t rise above +25°C. The heat is particularly noticeable when dancing: our classroom is very limited when it comes to ventilation and opening windows, so everyone is sweating within 5-10 minutes of starting the warm-up. On the other hand, it is the perfect time for stretching — muscles warm up quickly and lose heat more slowly. Ira is making the most of this: she has decided to devote the last month of this year’s course to stretching alone.

Earlier I wrote about work on translating the OSGeo4W network installer into Ukrainian. It’s time to report. Translations are done, new resource files are committed to SVN, installers are built, uploaded to the server and available for download. Download links can be found on the OSGeo4W home page.

Nice little things

27.05.2009 10:34 ·  GIS  ·  qgis, ftools, osgeo4w

After spending some time solving various issues, I have finally managed to build the OSGeo4W network installer from source. This is necessary to create a similar installer, but with resource files translated into Ukrainian (and possibly in Russian, if I have enough motivation and time). As for many people, English is still quite a serious obstacle, and besides, it is much more pleasant to communicate with the program in your native language.

Just half an hour ago, my patch for fTools was accepted. The changes are available as of revision f13f45e (SVN r10849). Yay!

First patch for fTools

26.05.2009 09:08 ·  GIS  ·  qgis, ftools

I have prepared and submitted my first patch for fTools. The patch allows to use only selected features in the following geoprocessing tools:

I also made changes to the Basic Statistics tool. Namely, I added the ability to work with selected features and added support for text fields (previously only numeric fields were supported).

Ticket in bugtracker #11774. I already got a reply from Carson (fTools author): the patch will be applied soon.

QGIS 1.0.2 and 1.1.0 are out

15.05.2009 15:13 ·  GIS  ·  qgis, release

Finally! The simultaneous release of QGIS versions 1.0.2 “Kore” (stable release) and 1.1.0 “Pan” (unstable release) was officially announced yesterday. The most notable changes are outlined in the release announcement (Ukrainian version is also available) and Tim’s blog post, while the list of fixed bugs can be found in Trac.

Packages for various Linux distributions and a source code archive can be found on the download page. For Windows users there are two options: the OSGeo4W network installer and a standalone all-in-one installer.

Patching fTools

13.05.2009 10:54 ·  GIS  ·  qgis, ftools

After creating my plugin for QGIS (statistics for vector layers), I moved on to improving fTools. Namely, I started adding the ability to work with selected features to the geoprocessing tools.

Last week I finished Buffer and Convex Hull, today I had some free time and updated Dissolve. There are 5 tools left, then I can move on to another group. By a strange coincidence there are also five in fTools.

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.

GIS Geoproject 5.27RC2

17.12.2008 16:12 ·  GIS  ·  geoproject, release

After a long delay of almost half a year, the second release candidate of GIS Geoproject 5.27 has been released. In addition, Eugene updated the site design and slightly revised the navigation (in particular, he removed references to the mysterious “Land Project”).

Among the changes, I would like to highlight the following:

The full list of changes can be found on the website. There are two versions available for download: the RC1 → RC2 update and the full installation package.