The following might be off topic, not sure...

Ian's comment about compilers made me recall working on the
interpolate function (SE 1.1 thing). It works perfectly well but is
horribly slow because, like all the other filter functions, it starts
from square 1 each time. In this case that means working out what type
of interpolation the user has requested, then checking the sequence of
values provided and falling back to some other interp method if
necessary, then (finally) processing the input value. If you actually
used this implementation in a raster colormap (the original intention)
you could get through a long novel while waiting for it to slog
through all of the redundant repetition.

The problem is that it is an interpreter with no caching of symbols,
values or the abstract syntax tree. It's crying out for a scripting
language approach.

A little while before I had been working on the jiffle scripting
language (http://code.google.com/p/jai-tools/wiki/Jiffle) which works
with images as inputs. It was relatively easy to implement (thanks to
the ANTLR parser) and would zip through the above interpolation task.

I'd love to try to ANTLR-ize the filter functions and the SLD parser
at some stage (GeoTools 3.0 perhaps :)

Michael

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to