Hi,

An ogc:Filter goes into the Rule tag (as is partly visible on your
screenshot aswell), but you can try this as your label tag:

<Label>
    <ogc:Function name="if_then_else">
        <ogc:Function name="lessThan">
            <ogc:PropertyName>NumRuta</ogc:PropertyName>
            <ogc:Literal>10</ogc:Literal>
        </ogc:Function>
        <ogc:PropertyName>NumRuta</ogc:PropertyName> <!-- OR a literal, a
shield icon?-->
        <ogc:Literal>This get's rendered as a lable if NumRuta >=
10</ogc:Literal>
    </ogc:Function>
</Label>

docs for filter functions:
http://docs.geoserver.org/stable/en/user/filter/function_reference.html

btw a superhandy SLD cheat-sheet
ftp://download.osgeo.org/osgeo/foss4g/2009/SPREP/1Wed/Parkside%20GO3/1300/SLDReferenceSheet.pdf

All the best,
Tõnis

2017-08-29 18:22 GMT+03:00 Hahesa <harold.herre...@gmail.com>:

> Thank you!
> I try using  filter in the Label Tag but the geoserver send me this
> [image: Imágenes integradas 1]
> Thanks for your help!
>
> 2017-08-29 1:03 GMT-06:00 imse [via OSGeo.org] <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5332919&i=0>>:
>
>> Hi Hanesa,
>>
>> Yes, you need filter:
>>
>> <ogc:Filter>
>>          <ogc:PropertyIsEqualTo>
>>            <ogc:PropertyName>..</ogc:PropertyName>
>>            <ogc:Literal></ogc:Literal>
>>          </ogc:PropertyIsEqualTo>
>>        </ogc:Filter>
>>
>> You can find some examples here:
>>
>> http://docs.geoserver.org/stable/en/user/styling/sld/cookboo
>> k/lines.html#attribute-based-line
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://osgeo-org.1560.x6.nabble.com/Different-Labels-using-
>> filter-SLD-tp5332816p5332859.html
>> To unsubscribe from Different Labels using filter SLD, click here.
>> NAML
>> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> Harold Herrera Sánchez
> Teléfono: 2259-4242
> Celular: 8831-3082
>
> ------------------------------
> View this message in context: Re: Different Labels using filter SLD
> <http://osgeo-org.1560.x6.nabble.com/Different-Labels-using-filter-SLD-tp5332816p5332919.html>
> Sent from the GeoServer - User mailing list archive
> <http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html> at
> Nabble.com.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> 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
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>


-- 
@tkardi
skype: tonis.kardi
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to