Last week I finally got the go-ahead for something I have been planning to do for some time. It’s not in the 3.8, but a first alpha of it will probably (I hope 🙂 ) not be far behind it. What am I talking about? Well, about Python (the programming language) and ILWIS. The intention is to make a module that extends Python with Geo-functionality based on the ILWIS libaries. First I want to expose the data interface and calculator of ILWIS in some way and maybe after that the rendering of ILWIS maps (not sure about that yet).
This extension I think is quite important as it makes it possible to connect ILWIS functionality to a lot of other tools that have also Python interfaces ( e.g. R). For many people Python is easier to program than C++ (the language ILWIS is written in) so I might get some more people contributing to ILWIS. It will probably also enable an easy way to integrate Python scripts in ILWIS. Though it opens up a lot of potential if I succeed, using it has some disadvantages. Python is considerably slower than C++, so writing heavy duty, high performace Python scripts is a pipe dream. But there are many other things where it can be useful so I am looking forward to it.
Yes we can
Last week a colleague of mine remarked that he found it strange that you couldn’t do operations in the Mapwindow like, for example, in ArcGIS (though that implementation is, like much in ArcGIS, a bit clunky). I never really thought about it, but I saw some merits in his observation. The idea is to be able to do an operation on a layer and the get the result directly in the mapwindow. For example, a buffer operation on a pointmap and then getting the buffered pointmap directly in the mapwindow.
After thinking a (very) short while about it I realized that I had all the routines needed for it already available and I only needed to make a new ‘Tool’ for the mapwindow that connected these routines. Within 2 hours I had the first prototype and after a little bit more debugging I had a working first version.
It looks like this
A new node has appeared in the Layer tree called “operations’. When you open the node you get the normal application dialog and when pressing OK, ILWIS starts calculating and the result is added to the layers.
For example, when running the Isolines applications I get the following
a new layer is automatically (iso) added.
Apart from the functionality, for me it was quite a nice exercise to see if the underlying design in ILWIS was flexible enough to adapt quickly to new whishes.
Anyway, back to debugging.
Leave a Reply