Thursday, July 18, 2013

New work on the Jiffle compiler

Jiffle is a scripting language for raster algebra. It can be used for stand-alone applications, or as the basis for image or map calculators (e.g. the JGrassTools Mapcalc module). If you haven't met Jiffle yet, take a look at the user guide and some of the previous posts about the language such as Jiffle meets Mandelbrot and Jiffle plays the Game of Life.

The Jiffle compiler is built on the fabulous ANTLR parser generator. To date, Jiffle has used ANTLR version 3 and many compilation tasks such as syntax checking, optimization and translation to Java sources involve Java code embedded directly within the ANTLR grammar files. It all works but it's messy, brittle and hard to follow.

We are now moving to ANTLR version 4 which encourages a very different approach with simpler, language-neutral grammars processed by visitors and/or listeners coded as ordinary Java classes. This promises to make the Jiffle compiler sources much easier to understand, maintain and extend.

For Jiffle users, few if any changes will be evident on the outside at first: the Jiffle language itself will stay the same and all existing scripts will still run. The high-level parts of the API for Java clients (e.g. the JiffleBuilder class) will also remain much as they are. But later on, the new compiler will make it easier to add new language features and extend the API.

Stay tuned...

Wednesday, January 30, 2013

Changes to source repository structure

We have changed the layout of the source repositories for JAITools and Jiffle at GitHub.

The releases archive branch has been renamed to stable to cater for work on bug fixes and performance improvements relative to the most recently released version.

If you have a local clone, next time you do a fetch or pull you will get the new branch stable. Your local copy of the old releases will now be stale and can be removed with:

    git remote prune origin

For more details about the new structure and work-flow, see this JAITools issue.

Sunday, January 27, 2013

JAITools version 1.3.1 released

The JAITools project is happy to announce the release of version 1.3.1 which is now available from Maven Central.

This is a maintenance version with some important bug fixes and improvements including:

  • The RangeLookupTable class, used by the RangeLookup operation, can now be safely used by concurrent threads and is more efficient when working with a large number of lookup items.
  • The DiskMemImageGraphics class, used in conjunction with the JAITools tiled image class DiskMemImage, now handles clipping and transforms in an equivalent manner to standard Java AWT classes (thanks to Ákos Maróy for his work on this).
  • A new ImageDataType enum has been added to make it easier to associate data types identified by DataBuffer constants with Number classes.
For more details of the changes in this release, browse the issue tracker and source repository at GitHub. You can also browse the javadocs at

Share and enjoy !

Tuesday, January 15, 2013

JAITools and Jiffle go to GitHub

After moving the JAITools and Jiffle sources from Subversion to Git a while ago, we have now gone further down the well-trodden, cool cats road and transferred the source repositories for both projects from Google Code to GitHub. The main reason is to take advantage of GitHub's pull request facility and make it a lot easier for people (ie. you) to contribute to the projects.

Both projects will stick to the simple repository structure that we have been using at Google Code, with two permanent branches:

master for development (which we try to keep buildable)
releases which we branch off master for each formal release.

Additional feature branches may sometimes be present but will always be temporary (ie. eventually merged into master or discarded).

To get the code:

    git git://
    git git://

All issues from the Google Code tracker have been transferred to the GitHub tracker (minus any attached files).

Share and enjoy !