Hi Michael:

I think they are silent because according to their XML Schema those cases 
cannot occur.
For our cases we probably want to throw an error (because the wrong number of 
parameters was provided; unless you can think of a sensible solution?

You may also wish to read the XML Schema part of the specification; often the 
XML comments are more specific then the text.

I am also keen on some of the other functions; such as string concatenate that 
uses a variable number of parameters.

Jody


On 20/03/2010, at 5:37 PM, Michael Bedward wrote:

> Hi folks,
> 
> I'm working on putting some flesh onto the bones of
> InterpolationFunction which have been sitting in the render module for
> some time (thanks Jody for pointing me to this).
> 
> I've got the basics of linear, cosine and cubic interpolation working
> for numeric values. Next it's on to Color and after that raster
> support.
> 
> I'm following the Symbology Encoding 1.1 specs but they are silent on
> what to do in a few exceptional cases.  In the following,
> 'interpolation point' refers to each of the data:value pairs provided
> to the function by the user...
> 
> 1. What to do if no interpolation points are provided ?  Be generous
> and just return the lookup value or be strict and throw an Exception ?
> 
> 2. What to do if only one interpolation point is provided ?  Use it's
> value as the return or throw an Exception ?
> 
> 3. For cubic interpolation, if less than 4 points are provided I'm
> presently falling back to cosine interpolation and logging a warning,
> but perhaps it should be an Exception ?
> 
> 4. For cubic interpolation we need an interpolation point on either
> side of the pair that define the segment defining the interval that
> contains the lookup value:
> 
> o--------o----x----o--------o
> 
> But what to do in cases like this...
> 
> o--------o--------o----x----o
> 
> Fall back to cosine ?  Return the value of the second last point ?
> 
> Michael
> 
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to