Hi Geoserver User list I have a layer where I want certain rules to be rendered higher in the z-order, using the vendor option 'sortBy', as described here<https://docs.geoserver.org/latest/en/user/styling/sld/extensions/z-order/index.html>. However the field I wish to sort on is text, not numeric.
I thought I could do this using the Recode function, as follows: <sld:VendorOption name="sortBy"> <ogc:Function name="Recode"> <ogc:PropertyName>OPERATING_STATUS</ogc:PropertyName> <ogc:Literal>mineral deposit</ogc:Literal> <ogc:Literal>50</ogc:Literal> <ogc:Literal>historic mine</ogc:Literal> <ogc:Literal>60</ogc:Literal> <ogc:Literal>closed</ogc:Literal> <ogc:Literal>70</ogc:Literal> <ogc:Literal>under development</ogc:Literal> <ogc:Literal>80</ogc:Literal> <ogc:Literal>feasibility</ogc:Literal> <ogc:Literal>80</ogc:Literal> <ogc:Literal>care and maintenance</ogc:Literal> <ogc:Literal>90</ogc:Literal> <ogc:Literal>operating mine</ogc:Literal> <ogc:Literal>100</ogc:Literal> </ogc:Function> </sld:VendorOption> But this seems to do nothing. Is there a way to sort a text field according to a preset numerical ordering? Thanks Michael Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
_______________________________________________ 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