sábado, abril 23, 2011

Big changes in SEXTANTE

I have been making some important changes in the last 2-3 weeks and, although I still have to test them an finish a few things, most of there are already working. These changes are rather big, since they involve modification of the SEXTANTE core architecture and, specially, the sextante_gui project. Here is a detailed description of some of them.

-Removal of WPS client. The WPS client was not working and it was somehow difficult to mantain, so, after asking SEXTANTE users and developers on the mailing lists, I decided to remove it. I guess that no one was using it, and the idea was not just removing it, but reimplementing it in a different way. Removing the project was not as easy as just taking a project away, but required some changes in the core classes as well. That made me see that its design was not right, and made me think about a new way of implementing extensions to the set of native algorithms of SEXTANTE. And that's how I came up with the next big change: Algorithm Providers

-Algorihtm Providers: Along with the basic set of algorithms (those programmed in Java using the SEXTANTE base classes), SEXTANTE includes algoritms from different sources. The WPS client was one of those sources, as well as the modeler or the GRASS interface. However, all these were developed independently and needed some adjustment in the core os SEXTANTE. Although a model or an algorithm coming from GRASS is technically a SEXTANTE geoalgorithm (it extends the GeoAlgorithm class), there are some minor differences, and I solved the problems associated with those differences by adding some patches to the SEXTANTE core.

This is, however, not a very clean option, specially considering that other sources of algorithms might be added in the future. For this reason, I decided to create a mechanism for "plugging" algorithm sources in a clean and robust manner. What I have done is to create an interface named IAlgorithmProvider and methods to add ojects of this class to SEXTANTE before initializing the library, so the list of algorithms is enriched with the algorithm it provides.

An algorithm provider takes care of everything needed to incorporate algorithms, from the particular characteristics of their execution, to the location of their associated help files, and including things such as the configuration panel that the provider might need or the icon of the algorithms in the toolbox and the modeler. With this change, all algorithms behave exactly the same and there is no need to add patches to the core classes. For instance, there was a "model" command in the command line interface to execute models. Now there is just the "runalg" algorithm, and it can be used to execute any algorithm, no matter if it is a model or a GRASS algorithm or it comes from any other provider yet to be developed.

After making these changes to the core classes, I have created 3 providers. The first two ones simply adapt the modeler interface and the GRASS interface, so now they are not part of the core classes. Adapting them has been relatively easy, although the GRASS one needs some testing yet, and I have detected a few issues while rewriting it. The third provider wraps SAGA algorithms and it took me just a couple of days to develop (still need to test it in linux and add some minor stuff, but it is almost done). This is partly due to the good knowledge I have of SAGA after speding many years using it and developing many of its modules, but also due to the new SEXTANTE design, which makes it very easy to incorporate third-party algorithms through an algorithm provider. Here is a picture of the toolbox, with both SAGA and GRASS algorithms activated.

More info about other changes in the next post, to come soon...

12 comentarios:

Anónimo dijo...

Hola Victor,

You rock as usual :-)
THANKS a lot indeed for your outstanding work!

BTW, even though it is a bit off-topic with your post, I would like to ask you a question related to this new development into Sextante.
My question is how much would be difficult for you to add, in the future, the R tools (for statistical analyses) into Sextante?

At present, to my knowledge, you can already use R with Qgis through one plug-in (http://www.ftools.ca/manageR/)

Needless to say, it would be awesome to have the same R tools with Sextante in order to use them with other JAVA Gis software (e.g. gvSIG)

volaya dijo...

Thanks for you support.

For your information, I am currently working on integrating R using this extension mechanism, and this work will probably be finished along with other people who are experts on R, since many people (like yourself) have shown interest for this integration :-) Also, I would like to integrate OrfeoToolbox, just as QGis does.

Thanks again for your interest.

markusN dijo...

Hi Victor,

last Friday I have spent some 5+ hours on cleaning up the keywords in the GRASS GIS modules (coming back from the Italian gvSIG day where I presented the actual GRASS-Sextante integration).

All binary modules have now at least two keywords. For consistency, I analysed existing keywords and harmonized them to achieve major grouping.

I hope they can be used to auto-populate the menu in Sextante. Please let me know if you need anything different or better.


volaya dijo...

Markus, thanks for your help. I hadn't hought about using keywords to divide GRASS algorithms into groups, but sounds like a good idea.

I will think about how to do it. Sounds great.

Thanks again!

Jorge dijo...

Great job, Victor Olaya. Please let me know when you finish the SAGA GIS algorithms running under SEXTANTE.

Best Wishes,

Jorge Santos

giohappy dijo...

Hi Victor,
I hadn't read this post, but I found it looking for Sextante + R and Sextante + OTB. Very good to know you're working on that, it's of huge interest for many!
Do you have already put some code on svn?


Anónimo dijo...

We stumbled over here from a different web address and thought I should check things out.
I like what I see so now i'm following you. Look forward to looking at your web page for a second time.
Here is my weblog Can I Buy Resveratrol Supplements

Anónimo dijo...

Article writing is also a fun, if you be familiar with after that you can write or else
it is complex to write.

Here is my web page :: online shopping portals

Anónimo dijo...

Asking questions are in fact good thing if you are not understanding something completely, except this paragraph provides nice understanding yet.

My site; wiki.nexuiz.com

Anónimo dijo...

For most up-to-date information you have to go to see web and on internet I found this web site as a most excellent site for
hottest updates.

Also visit my weblog ... arabica coffee beans

Anónimo dijo...

Thanks for sharing your thoughts about camo clothing.

Have a look at my web site ... please click the next page

Anónimo dijo...

If some one desires expert view on the topic of blogging and site-building
then i recommend him/her to go to see this website, Keep up the good job.

my webpage baby Clothing