Moving the discussion to the devel list. Please check the following pull request: https://github.com/geotools/geotools/pull/4819
*camptocamp* INNOVATIVE SOLUTIONS BY OPEN SOURCE EXPERTS *Gabriel Roldán* Geospatial Developer On Fri, Jun 21, 2024 at 10:50 AM Alexandre Gacon <alexandre.ga...@gmail.com> wrote: > Gabriel Roldan is taking care of it. > > Alexandre > > Le ven. 21 juin 2024 à 15:45, Alexandre Gacon <alexandre.ga...@gmail.com> > a écrit : > >> I initiated the ticket https://osgeo-org.atlassian.net/browse/GEOT-7607. >> >> Regards >> Alexandre >> >> Le ven. 21 juin 2024 à 14:58, Andrea Aime < >> andrea.a...@geosolutionsgroup.com> a écrit : >> >>> Hi Steve, >>> yes, that commit is involved, as it triggers a bug in the function >>> implementation. >>> A function must not rely on the context object being set, the context is >>> provided only so that the function can try to covert >>> its result towards it. Passing in "null" or "object" means "do what you >>> want, we're not asking for a particular type of output", >>> but the current implementation throws an exception instead. Looks like >>> the error predates the git history (14+ years) >>> In any case, that needs to be fixed. >>> >>> Regards, >>> >>> Andrea Aime >>> >>> >>> == >>> GeoServer Professional Services from the experts! >>> >>> Visit http://bit.ly/gs-services-us for more information. >>> == >>> >>> Ing. Andrea Aime >>> @geowolf >>> Technical Lead >>> >>> GeoSolutions Group >>> phone: +39 0584 962313 >>> >>> fax: +39 0584 1660272 >>> >>> mob: +39 339 8844549 >>> >>> https://www.geosolutionsgroup.com/ >>> >>> http://twitter.com/geosolutions_it >>> >>> ------------------------------------------------------- >>> >>> Con riferimento alla normativa sul trattamento dei dati personali (Reg. >>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si >>> precisa che ogni circostanza inerente alla presente email (il suo >>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è >>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il >>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra >>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia. >>> >>> This email is intended only for the person or entity to which it is >>> addressed and may contain information that is privileged, confidential or >>> otherwise protected from disclosure. We remind that - as provided by >>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this >>> e-mail or the information herein by anyone other than the intended >>> recipient is prohibited. If you have received this email by mistake, please >>> notify us immediately by telephone or e-mail >>> >>> >>> On Mon, Jun 17, 2024 at 11:16 PM Ikeoka, Steve via Geoserver-users < >>> geoserver-us...@lists.sourceforge.net> wrote: >>> >>>> There isn't enough of the stack trace provided but this commit is a >>>> possible source of the regression (GeoServer 2.23.3+): >>>> https://github.com/geotools/geotools/commit/d7991fdcd1630ea1c18b5dfad91d4e291b8bb95b >>>> >>>> Steve Ikeoka >>>> ------------------------------ >>>> *From:* Jody Garnett <jody.garn...@gmail.com> >>>> *Sent:* Monday, June 17, 2024 10:17 AM >>>> *To:* Carsten Klein <c.kl...@datagis.com> >>>> *Cc:* GeoServer Mailing List List < >>>> geoserver-us...@lists.sourceforge.net> >>>> *Subject:* Re: [Geoserver-users] Error using function Interpolate in >>>> COLOR mode from SLD >>>> >>>> It is more that I am not aware of any change that could cause this >>>> regression. Were you able to determine when the problem was introduced and >>>> report the issue to the issue tracker? I am curious to what you will find. >>>> Determing which release >>>> ZjQcmQRYFpfptBannerStart >>>> This Message Is From an External Sender >>>> Please use caution with links, attachments, and any requests for >>>> credentials. >>>> >>>> ZjQcmQRYFpfptBannerEnd >>>> It is more that I am not aware of any change that could cause this >>>> regression. >>>> >>>> Were you able to determine when the problem was introduced and report >>>> the issue to the issue tracker? >>>> >>>> I am curious to what you will find. Determing which release the problem >>>> started in will help a great deal. >>>> -- >>>> Jody Garnett >>>> >>>> >>>> On Jun 13, 2024 at 8:07:09 AM, Carsten Klein <c.kl...@datagis.com> >>>> wrote: >>>> >>>> Hi Jody, >>>> >>>> why a puzzle? I've just checked this: The error is reproducible with >>>> the latest GeoServer main branch, by simply adding an Interpolate filter >>>> function in color mode to one of the standard SLD styles (e.g. >>>> simple_roads) in standard data directory. >>>> >>>> Making CSSParameter stroke depend on wms_scale_denominator: >>>> >>>> <Stroke> >>>> <CssParameter name="stroke"> >>>> <ogc:Literal>#AA3333</ogc:Literal> >>>> <ogc:Function name="Interpolate"> >>>> <ogc:Function name="env"> >>>> <ogc:Literal>wms_scale_denominator</ogc:Literal> >>>> </ogc:Function> >>>> <ogc:Literal>2132</ogc:Literal> >>>> <ogc:Literal>#AA3333</ogc:Literal> >>>> <ogc:Literal>17471320</ogc:Literal> >>>> <ogc:Literal>#AA9999</ogc:Literal> >>>> <ogc:Literal>color</ogc:Literal> >>>> </ogc:Function> >>>> </CssParameter> >>>> <CssParameter name="stroke-width"> >>>> <ogc:Literal>2</ogc:Literal> >>>> </CssParameter> >>>> </Stroke> >>>> >>>> leads to exception: >>>> >>>> [...] >>>> Caused by: java.lang.IllegalArgumentException: Trying to evaluate the >>>> function as Object but the method parameter is set as COLOR >>>> at >>>> org.geotools.filter.function.InterpolateFunction.evaluate(InterpolateFunction.java:323) >>>> at >>>> org.geotools.filter.function.InterpolateFunction.evaluate(InterpolateFunction.java:301) >>>> at >>>> org.geotools.filter.visitor.SimplifyingFilterVisitor.visit(SimplifyingFilterVisitor.java:484) >>>> at >>>> org.geotools.filter.function.InterpolateFunction.accept(InterpolateFunction.java:296) >>>> at >>>> org.geotools.styling.visitor.DuplicatingStyleVisitor.copy(DuplicatingStyleVisitor.java:379) >>>> at >>>> org.geotools.styling.visitor.DuplicatingStyleVisitor.visit(DuplicatingStyleVisitor.java:655) >>>> at org.geotools.styling.StrokeImpl.accept(StrokeImpl.java:420) >>>> [....] >>>> >>>> thrown here: >>>> >>>> >>>> https://github.com/geotools/geotools/blob/f0c9961dc4d40c5acfce2169fab92805738de5ea/modules/library/main/src/main/java/org/geotools/filter/function/InterpolateFunction.java#L320 >>>> <https://urldefense.us/v3/__https://github.com/geotools/geotools/blob/f0c9961dc4d40c5acfce2169fab92805738de5ea/modules/library/main/src/main/java/org/geotools/filter/function/InterpolateFunction.java*L320__;Iw!!JRQnnSFuzw7wjAKq6ti6!xut7MRht1ecLGteZ1aKGg5roShoUSjG5tqvW0u3NMBIcQXEZEhSwHmbskJ-MFnqjKx-G314NqB5naHhV1L1EZOg$> >>>> >>>> Seems like *Class<T> context* does not implement *Color* It works fine >>>> if method is "numeric" (in contrast to "color"). >>>> >>>> Carsten >>>> >>>> >>>> Am 10.06.2024 um 20:55 schrieb Jody Garnett: >>>> >>>> H there x 2, >>>> >>>> That is quite a puzzle. >>>> >>>> It may be a case of: >>>> >>>> 1. Trying to reproduce the error with the standard data directory >>>> and making a bug report >>>> 2. Trying the different version between 2.22.2 and 2.25.1 to see >>>> when it breaks (and then we could learn more) >>>> If doing this approach it is best to bisect debugging approach: >>>> take a version in the middle, and then you know to test higher or lower. >>>> Take in the middle of the new range etc... >>>> >>>> >>>> -- >>>> Jody Garnett >>>> >>>> >>>> On Jun 9, 2024 at 11:59:07 PM, Carsten Klein <c.kl...@datagis.com> >>>> wrote: >>>> >>>> Hi there, >>>> >>>> I've updated one of our GeoServes from version 2.22.2 to latest stable >>>> 2.25.1. When requesting SLD-styled maps via WMS I'm getting this OWS >>>> exception: >>>> >>>> Error rendering layer mga.bl: Trying to evaluate the function as Object >>>> but the method parameter is set as COLOR >>>> >>>> I guess, it's about the Interpolate function, which we use to vary line >>>> colors depending on wms_scale_denominator: >>>> >>>> <Fill> >>>> <CssParameter name="fill"> >>>> <ogc:Function name="Interpolate"> >>>> <ogc:Function name="env"> >>>> <ogc:Literal>wms_scale_denominator</ogc:Literal> >>>> </ogc:Function> >>>> <ogc:Literal>2132</ogc:Literal> >>>> <ogc:Literal>#202020</ogc:Literal> >>>> <ogc:Literal>17471320</ogc:Literal> >>>> <ogc:Literal>#404040</ogc:Literal> >>>> <ogc:Literal>color</ogc:Literal> >>>> </ogc:Function> >>>> </CssParameter> >>>> </Fill> >>>> >>>> There's no longer any error after removing that function from SLDs. >>>> >>>> The styles have not been changed. These used to work well with the >>>> 2.22.2 version. >>>> >>>> I haven't found any breaking changes in the documentation for filter >>>> function Interpolate. Actually, my SLD seems quite identical to what the >>>> documentation shows: >>>> >>>> >>>> https://docs.geoserver.org/main/en/user/styling/sld/tipstricks/transformation-func.html#id2 >>>> <https://urldefense.us/v3/__https://docs.geoserver.org/main/en/user/styling/sld/tipstricks/transformation-func.html*id2__;Iw!!JRQnnSFuzw7wjAKq6ti6!xut7MRht1ecLGteZ1aKGg5roShoUSjG5tqvW0u3NMBIcQXEZEhSwHmbskJ-MFnqjKx-G314NqB5naHhVtIy64QA$> >>>> >>>> Any help and ideas are very appreciated. >>>> >>>> Cheers >>>> Carsten >>>> _______________________________________________ >>>> Geoserver-users mailing list >>>> >>>> Please make sure you read the following two resources before posting to >>>> this list: >>>> - Earning your support instead of buying it, but Ian Turton: >>>> http://www.ianturton.com/talks/foss4g.html#/ >>>> <https://urldefense.us/v3/__http://www.ianturton.com/talks/foss4g.html*/__;Iw!!JRQnnSFuzw7wjAKq6ti6!xut7MRht1ecLGteZ1aKGg5roShoUSjG5tqvW0u3NMBIcQXEZEhSwHmbskJ-MFnqjKx-G314NqB5naHhV9QvXDxc$> >>>> - The GeoServer user list posting guidelines: >>>> http://geoserver.org/comm/userlist-guidelines.html >>>> <https://urldefense.us/v3/__http://geoserver.org/comm/userlist-guidelines.html__;!!JRQnnSFuzw7wjAKq6ti6!xut7MRht1ecLGteZ1aKGg5roShoUSjG5tqvW0u3NMBIcQXEZEhSwHmbskJ-MFnqjKx-G314NqB5naHhVNukDhRI$> >>>> >>>> If you want to request a feature or an improvement, also see this: >>>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer >>>> <https://urldefense.us/v3/__https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer__;!!JRQnnSFuzw7wjAKq6ti6!xut7MRht1ecLGteZ1aKGg5roShoUSjG5tqvW0u3NMBIcQXEZEhSwHmbskJ-MFnqjKx-G314NqB5naHhVicMCAv4$> >>>> >>>> >>>> geoserver-us...@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>>> <https://urldefense.us/v3/__https://lists.sourceforge.net/lists/listinfo/geoserver-users__;!!JRQnnSFuzw7wjAKq6ti6!xut7MRht1ecLGteZ1aKGg5roShoUSjG5tqvW0u3NMBIcQXEZEhSwHmbskJ-MFnqjKx-G314NqB5naHhVwRZUp1Q$> >>>> >>>> _______________________________________________ >>>> Geoserver-users mailing list >>>> >>>> Please make sure you read the following two resources before posting to >>>> this list: >>>> - Earning your support instead of buying it, but Ian Turton: >>>> http://www.ianturton.com/talks/foss4g.html#/ >>>> - The GeoServer user list posting guidelines: >>>> http://geoserver.org/comm/userlist-guidelines.html >>>> >>>> If you want to request a feature or an improvement, also see this: >>>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer >>>> >>>> >>>> geoserver-us...@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>>> >>> _______________________________________________ >>> Geoserver-users mailing list >>> >>> Please make sure you read the following two resources before posting to >>> this list: >>> - Earning your support instead of buying it, but Ian Turton: >>> http://www.ianturton.com/talks/foss4g.html#/ >>> - The GeoServer user list posting guidelines: >>> http://geoserver.org/comm/userlist-guidelines.html >>> >>> If you want to request a feature or an improvement, also see this: >>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer >>> >>> >>> geoserver-us...@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>> >> >> >> -- >> Alexandre Gacon >> > > > -- > Alexandre Gacon > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to > this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > geoserver-us...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users >
_______________________________________________ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel