On Thu, Dec 9, 2010 at 4:01 AM, Michael Bedward
<[email protected]> wrote:
> 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.

Ok, so it's a good candidate for being optimized out at the SLDtyleFactory
level

> 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 :)

ANTLR to parse XML? Please don't :-)

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------

------------------------------------------------------------------------------
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