Tioga: Recode is the wrong choice of SLD 1.1 function as it requires an *exact* match and your scale denominator is probably not going to be exactly 15000.
I recommend using Categorize which tests if a value is in between numbers; or Interpolate. For more informatio see the user manual: https://docs.geoserver.org/stable/en/user/styling/sld/tipstricks/transformation-func.html -- Jody Garnett On Fri, 28 Oct 2022 at 12:00, Rosas Vega, Tioga <tro...@ute.com.uy> wrote: > Hi list. > > hello list. > > I try to use de the recode function instead the "rule", with the goal > reduce the size the source of an SLD style with a lot of rules. > > I try to adatpt the "font-size" based on the scale, using the Recode > function, but it doesn't work, no errors but it returns an empty string. > > > > <CssParameter name="font-size"> > > <ogc:Function name="Recode"> > > <ogc:Function name="env"> > > <ogc:Literal>wms_scale_denominator</ogc:Literal> > > </ogc:Function> > > <ogc:Literal>500000</ogc:Literal> > > <ogc:Literal>20</ogc:Literal> > > <ogc:Literal>300000</ogc:Literal> > > <ogc:Literal>25</ogc:Literal> > > <ogc:Literal>150000</ogc:Literal> > > <ogc:Literal>28</ogc:Literal> > > <ogc:Literal>70000</ogc:Literal> > > <ogc:Literal>35</ogc:Literal> > > <ogc:Literal>35000</ogc:Literal> > > <ogc:Literal>38</ogc:Literal> > > <ogc:Literal>15000</ogc:Literal> > > <ogc:Literal>40</ogc:Literal> > > </ogc:Function> > > </CssParameter> > > > > > > Thank you, > > Tioga. > La información contenida en este mensaje y en cualquier archivo adjunto, > es confidencial y está dirigido únicamente al destinatario del mensaje. Si > Ud. no es el destinatario correcto por favor notifique al remitente > respondiendo este mensaje y elimine inmediatamente de su sistema el e-mail > y los posibles archivos adjuntos. Está prohibida cualquier utilización, > difusión o copia de este e-mail por cualquier persona o entidad que no sean > las especificas destinatarias del mensaje. UTE no acepta ninguna > responsabilidad con respecto a cualquier comunicación que haya sido emitida > incumpliendo nuestra Política de Seguridad de la Información, así como lo > previsto en la Ley 18.331 de Protección de Datos Personales y Ley 18381 de > Acceso a la Información Pública > _______________________________________________ > 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 >
_______________________________________________ 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