Andrea and Ian,
Thanks for this I will try the InBetween operator. I have also tried the ogc: prefix. I am reformatting SLDs that happily run against a Cubewerx webservice and have found the prefix to be redundant but will include it always from here on in. I have also tried the decimal instead of multiplying by 100 with no difference but I agreed that the simpler the better. If this works then all is well I will use this structure for all two bounds numeric comparisons. Thanks once again. Cheers, Brad Spencer Managing Director http://www.numaps.com.au/ mob: 0404 841 131 BradArt <https://www.facebook.com/pg/numaps.com.au/photos/?ref=page_internal> From: Andrea Aime <andrea.a...@geo-solutions.it> Sent: 27 March 2020 04:32 To: Ian Turton <ijtur...@gmail.com> Cc: Brad Spencer <b...@numaps.com.au>; geoserver-users <geoserver-users@lists.sourceforge.net> Subject: Re: [Geoserver-users] SLD on Geoserver Following up with Ian suggestion, the original filter contains several extra operations... I cannot try it of course, don't have the data, but what about something like this: <ogc:Filter> <ogc:And> <ogc:PropertyIsGreaterThan> <ogc:PropertyName>median_tot_hhd_inc_weekly</ogc:PropertyName> <ogc:Literal>0.0</ogc:Literal> </ogc:PropertyIsGreaterThan> <ogc:PropertyIsGreaterThan> <ogc:PropertyName>median_mortgage_repay_monthly</ogc:PropertyName> <ogc:Literal>0.0</ogc:Literal> </ogc:PropertyIsGreaterThan> <ogc:PropertyIsBetween> <ogc:Div> <ogc:PropertyName>median_mortgage_repay_monthly</ogc:PropertyName> <ogc:Mul> <ogc:PropertyName>median_tot_hhd_inc_weekly</ogc:PropertyName> <ogc:Literal>4.33333333</ogc:Literal> </ogc:Mul> </ogc:Div> <ogc:LowerBoundary> <ogc:Literal>0.3</ogc:Literal> </ogc:LowerBoundary> <ogc:UpperBoundary> <ogc:Literal>0.8</ogc:Literal> </ogc:UpperBoundary> </ogc:PropertyIsBetween> </ogc:And> </ogc:Filter> Observations: * The filters are in a different namespace than the SLD elements, given your prefix declaration in the top element, they should all be prefixed by "ogc:" * A single and can have as many predicates as you like, they are going to be evaluated in turn with short circuit evaluation * No need to multiply by 100, just use 0.3 and 0.8 instead of 30 and 80 * PropertyIsBetween seems indeed more concise and clear, avoids repeating the subject of the comparison twice As said, could test it, but hope it's useful nevertheless Cheers Andrea On Thu, Mar 26, 2020 at 6:06 PM Ian Turton <ijtur...@gmail.com <mailto:ijtur...@gmail.com> > wrote: Maybe you could use a Between filter? Ian _______________________________________________ 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 <mailto:Geoserver-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it 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