Read the full message, the answer does not change though, see my other reply 😂
Cheers Andrea On Mon, Sep 25, 2023 at 10:33 PM Reffett, Christopher < christopher.reff...@ga-ccri.com> wrote: > Sorry folks, accidentally hit send on that too early. Here's the message I > wanted to send: > > Hello all, > > I'm trying to make an SLD where a user can change the label field at > runtime, but I'm running into problems getting the "property" function to > work as expected with my data source. The source is producing complex > features, and they show up in geoserver as namespaced. If I prefix a > property with the namespace in <PropertyName>, everything works as > expected, but when I try to use <Function name="property">, I hit errors. > > A snippet like this works fine: > <Label> > <ogc:PropertyName>namespace:myFeature</ogc:PropertyName> > </Label> > > This fails with "The style specified an attribute named > 'namespace:myFeature', not found in the 'namespace:layer' layer" (and > similarly fails if I pass in a valid namespace-prefixed property name in > the request): > <Label> > <ogc:Function name="property"> > <ogc:Function name="env"> > <ogc:Literal>userDefinedLabel</ogc:Literal> > <ogc:Literal>namespace:myFeature</ogc:Literal> > </ogc:Function> > </ogc:Function> > </Label> > > I've tried a few different variations on the above (for example, removing > prefixes or adding the full URL of the prefix) without success. The latter > recipe also worked fine on a simple feature with no namespace, it's just > the complex feature with the namespace that caused things to break. I've > been digging through Google all day but have not found anything applicable > to this scenario. I'd appreciate any suggestions that you all have on what > I might be doing wrong here. > > I am using GeoServer 2.17.3 with OpenJDK 1.8.0_272 Server running in a > Linux container. I know, they're old - unfortunately upgrades to newer > versions are not a priority right now. > > Best, > Chris Reffett > ------------------------------ > *From:* Reffett, Christopher <christopher.reff...@ga-ccri.com> > *Sent:* Monday, September 25, 2023 4:10 PM > *To:* geoserver-users@lists.sourceforge.net < > geoserver-users@lists.sourceforge.net> > *Subject:* -EXT-[Geoserver-users] Trouble getting SLD property function > to work with namespaced properties > > > WARNING: This message is from an external source. Evaluate the message > carefully BEFORE clicking on links or opening attachments. > Hello all, > > I'm trying to write an SLD but am having trouble getting the "property" > function to work as expected. In short, I have a layer that has namespaced > fields (it's coming from a data source that produces complex features) and > am trying to make the label on those features able to be set by an env > variable in a request. > This wor > > I am using geoserver 2.17.3 - sorry, I know it's out of date, it'll be > some time before we can update. > _______________________________________________ > 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-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- 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
_______________________________________________ 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-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users