You should not need to convert with "parseDouble", the filter/expression language is untyped. The result of IDFunction() though is a feature id - starting with a letter since it is an XML ID.
If we switch to ECQL notation are you trying for: modulo( strSubstringStart( IDFunction(), strPosition( IDFunction(), ".", "fonttoback" )), 2 ) The generated function list is here http://docs.geotools.org/latest/userguide/library/main/function_list.html -- Jody Garnett On 23 March 2016 at 03:06, Piero Campalani <[email protected]> wrote: > A partial update: > > ========================================================= > final Function idFunction = new IDFunction(); > final Function id2Double = ff2.function("parseDouble", idFunction); > final Function modulo2Function = ff2.function("IEEERemainder", id2Double, > ff2.literal(2)); > ========================================================= > > But the evaluation of the "parseDouble" function cannot be converted to > Number. > (I hope I am on the right way anyway :)) > > -Piero > > > On 22 March 2016 at 17:22, Piero Campalani <[email protected]> wrote: > >> Hi, >> >> I am trying to define an arithmetic-based filtering as a rule for some >> dynamic feature styling. >> >> Specifically, I'd like to express: >> >> (feauture.getID() % 2) == 0 >> >> >> How can I express the modulo operator? >> FilterFactory2#.operator("%") ? >> How to use an Operator inside a Function or a general Expression? >> >> Thanks for helping, >> -Piero >> > > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 > _______________________________________________ > GeoTools-GT2-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > >
------------------------------------------------------------------------------
_______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
