martes, mayo 31, 2011

some little improvements

Most of my work in this last days has been solving minor bugs and adding small improvements to the SEXTANTE GUI. Here is a quick review of some of them. Not all of them have been finished and tested yet.

-Optional outputs. There is a new output channel (NullOutputChannel) that basically does nothing with the result of an algorithm. It can be selected from the output channel selection dialog, and doing so causes SEXTANTE not to create the corresponding output layer. This was, you can have optional outputs, but there is no need to set them as optional in the source code of each algorithm o take that into account somehow.

-GRASS algorithms in modeler. GRASS algorithms work now in the modeler, and I have already implemented a mechanism for dealing with the major issue: layers with more than one geometry type. When you execute a GRASS algorithm now, in case it generates vector layers with muliple geometry types, you have to select the type of geometry you want to use (the other ones are discarded). The selection is already implemented, but the GrassAlgorithm class is not using it yet. I will code that in a month or so, when I go to Salzburg to atend the AGIT conference, since we plan to have a code sprint there with other developers who know more than me about GRASS...

-Definition of analysis extent using stored points. Point stored using the catch coordinates tool can now be used to manually define the extent of the analysis region.

miércoles, mayo 11, 2011

New website and video tutorials

Maybe you have already realized that I have changed the website. Instead of redirecting to the OSOR wiki, now it redirects to a minimalistic nice-looking web page, which is, IMHO, much better and more practical.

If you go to the website, you will also see that there is a link to our brand new YouTube channel. I have already uploaded 13 video tutorials (around 3 min each), and plan to add many more in the following days (I try to do 1 or 2 each day...). I am recording them in english, in order to make them useful for everyone (I absolutely do not like my accent, but I hope you find them interesting anyway ;-) ).

Here is a quick list of all the ones that I want to have ready soon:

-the toolbox
-the parameters window
-the output region tab
-output channels
-capturing points
-the graphical modeler
-modeler inputs
-modeler inputs(II)
-modeler algorithms
-saving and configuring models
-batch processing
-batch processing(II)
-batch processing from open layers
-Numerical results
-Iterative execution of algorithms
-Basic operations with raster layers
-Focal statistics
-Local statistics
-The raster calculator
-Using masks
-Overlay operations with vector layers
-Dissolving vector layers
-Basic spatial statistics with vector layers
-Basic transformations for vector layers
-Basic transformations for vector layers(II)
-Creating profiles
-Creating a raster layer from a set of points
-Creating a density layer

Many more can be added to that list (and you can be sure that I will do it), but I would like to have your opinion. Is there anything that you would like to see there? Any process that you would like me to document in a video? If so, please feel free to tell me. I think video tutorials are great and easy to make, so all suggestions are welcome.

lunes, mayo 02, 2011

On ultrarunning, GIS and programming on the run.

Those of you that do not know me personally probably do not know that one of my biggest passions is running. And when I mean running, I mean running *a lot*. I have been into endurance sports since I was a kid, and since a few years ago I am a passionate ultrarunner, that meaning that I enjoy a 20 km run, but I have real fun when I get out of home early in the morning and come back home several hours later in the evening with 60-70 km [~43 miles for those not used to the International System] on my legs.

To run such long distances, a fair amount of physical endurance is needed but, more that that, a great psychological endurance is the key. As the classic ultrarunning mantra goes: "pain is inevitable, suffering is optional", and each ultrarunner has his own strategy for ignoring the pain and turning a long run into a rewarding (albeit painful) journey. Some like to listen to music, others simply think about their life. Dean Karnazes, by far the most popular ultrarunner around, wrote most of his best-seller "Ultramarathon man, confessions of an all-night runner" while running, recording his thoughts into a portable recorder and later transcribing them.

Now you must be wondering why I am writing this in this blog about GIS, SEXTANTE and programming. Well, there is a link between SEXTANTE and running, and I would even dare to say that SEXTANTE would not be the same if it were not for my long weekend runs. I do not like to listen to music while I run, and I definitely do not feel like bringing a recorder with me when I go running, but there is something that I love to do when I run. Guess it? That's right: programming. (Another thing that I usually do is to practice scales...but I have a blog about music to talk about that, so I will not bore you here with the details ;-) )

As the great Edsger Dijkstra said, "computer science is not more about computers than astronomy is about telescopes". In other words, you do not need a computer to program. Of course I do not do actual coding while running, but programming is much more that just typing code. Design and optimization are two of the things that can be done without having a computer in front of you. In fact, I have realized that I tend to code too much and think less than I should if I am sitting in front of a computer, so it is better for me to spend sometime "working" without a computer. Staying away from the computer lets me concentrate on details that I might overlook if I am typing code.

Also, running for several hours to the edge of exhaustion gives you an extremely clear thought once you get past the point where your mind and your body separate (and believe me, this happens sooner or later in every long run...otherwise your body would say no and stop), so, somehow, you get "cleverer" as you run. That makes it an ideal situation for thinking about such abstract problems, and for finding optimal solutions to them.

I am writing this here because, as I mentioned in some of my latest posts, there have been some important new functionalities added to SEXTANTE in the last weeks. Most of these new functionalities involve changes in the architecture of SEXTANTE and, thus, require not just coding, but also rethinking part of its design. And, as you might have probably figured out, I did a big part of that while running. The feeling of arriving home, eating something, having a shower (or, better, a freezing ice bath) and sitting in front of the computer to put your ideas to practice is just great, letting your thoughts flow and turn into code. Definitely, much better that sitting in my office at the university (although I usually go for a short early morning 10-15km run before going to work), and by far much more productive.

Now a question to all programmers around: Do you have any preferred moment of the day to work? Anything you like to do to get ready or boost your productivity and/or creativity?

By the way, I thought about this post and "wrote" most of it a few days ago on my mind during a long and beautiful 190+ km (half of them under pouring rain...) bike ride on the almost-abandoned roads around my town. Also, whenever I have a presentation or talk, I usually rehearse it while on the run, so I guess that SEXTANTE owes more than just code to my running/cycling sessions :-)