Andrea, thanks for reply,

I see your point, but how one can pass outside implementation in such a 
function? As far as I know, if you register function in

META-INF/services/org.opengis.filter.expression.Function

then it will be constructed using the default constructor.

If you will look at http://files.rsdn.ru/81424/SelectionLab.java, line 
275, you will notice, that I am using external implementation of my 
filter logic (passed as interface in constructor).

Do you have any idea how to workaround this limitation?

Thanks,
Sergey

On 30.06.2011 13:40, Andrea Aime wrote:
> On Thu, Jun 30, 2011 at 3:54 AM, Michael Bedward
> <michael.bedw...@gmail.com>  wrote:
>    
>> On 30 June 2011 00:36, Jody Garnett<jody.garn...@gmail.com>  wrote:
>>      
>>> Micheal I think we will need to mark selection lab as broken and open a bug
>>> report on this one; personally I would make a new Filter each time the
>>> selection changes (it is how I handle it in uDig). But that is just me ...
>>>        
>> Hi Jody, Sergey,
>>
>> I've been trying to follow this thread but must admit I'm lost. I'm
>> not familiar (= clueless) about the change to the way that styles are
>> handled, but if it means that filter functions can no longer be
>> created and used on the fly programmatically it seems that we've made
>> life harder for users (?).
>>      
> Style cloning has been there for a while for a variety of reasons
> (dpi, uom, simplify),
> if a function is not registered in SPI it won't be cloneable, won't be
> usable from
> CQL, SLD and so on.
>
> The tutorial at
> http://docs.geotools.org/latest/userguide/tutorial/advanced/function.html
> is way overkill though, in order to add a function all one has to do
> is to create
> the function implementation and register it in
> META-INF/services/org.opengis.filter.expression.Function
> and GeoTools will pick it up and make it cloneable.
>
> Now, if the results of the function are not stable (calling it twice
> in a row with
> the same parameters does not lead to the same result) then it also has to
> implement the VolatileFunction marker interface, but there are very few
> functions that need to do that
>
> Cheers
> Andrea
>
>
>    


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to