Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two SLD rules one using PropertyIsEqualTo and another using PropertyIsLike

Using PropertyIsEqualTo

          <Name>Vendor FirstVendor</Name>
                  <CssParameter name="fill">#0033CC</CssParameter>

Using PropertyIsLike

            <ogc:PropertyIsLike  wildCard="*" singleChar="." escape="!">

The SLD using Like works fine where as using equal does not work at all.I have seen the string in database well there is not leading or trailing spaces.

share|improve this question
Did you manage to find a solution to your problem. I seem to be having the exact same issue using PropertyIsEqualTo. I have looked at the resulting query that Geoserver creates and run this on the database. The database returns the results as expected but geoserver does not seem to render anything for the layer. Any help is much appreciated. Apologies for not posting this as a comment but it won't allow me to as I just created an account. – k9ty Nov 23 '12 at 14:30
@k9ty yes I found the solution the problem is there is some kind of bug or I don't know what's it the sld won't work you should use <ogc:Filter> <ogc:PropertyIsLike wildCard="*" singleChar="." escape="!"> <ogc:PropertyName>Vendor</ogc:PropertyName> <ogc:Literal>V1*</ogc:Literal> </ogc:PropertyIsLike> </ogc:Filter> – kinkajou Nov 26 '12 at 3:55
@k9ty here we have used the query "like" it the solution for now I guess. I could not solbe the problem with captDragon solution as there was validation error. – kinkajou Nov 26 '12 at 3:56

Try adding matchCase="true" like this:

<ogc:PropertyIsEqualTo matchCase="true">

I know it doesn't really make sense, but comparing yours to mine, that's the only difference i see.

share|improve this answer
Attribute 'matchCase' is not allowed to appear in element 'ogc:PropertyIsEqualTo' – kinkajou Feb 29 '12 at 3:59
What is not allowing you? It's part of the OGC spec. – CaptDragon Feb 29 '12 at 13:40
it works partially but geoserver validate button generates error – kinkajou Mar 1 '12 at 4:58
What's the error? And do you have this xmlns:ogc="" at the top of the xml file? – CaptDragon Mar 1 '12 at 13:54
Yes. xsi:schemaLocation=" StyledLayerDescriptor.xsd" xmlns=""; xmlns:ogc=""; xmlns:xlink=""; xmlns:xsi=""; – kinkajou Mar 5 '12 at 4:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.