Backslash \ in PropertyIsEqualTo literal in SLD
-----------------------------------------------

                 Key: GEOS-1964
                 URL: http://jira.codehaus.org/browse/GEOS-1964
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 1.6.4
         Environment: Servlet container: Tomcat 6.0.16. 
Datastore: PostgreSQL 8.3.1 + PostGIS 1.3.3.
            Reporter: Albin Lundmark
            Assignee: Andrea Aime
             Fix For: 1.6.5



Geoserver doesn't render my features when I use a filter like this in my SLD 
(see whole document below):
             <ogc:Filter>
                   <PropertyIsEqualTo xmlns="http://www.opengis.net/ogc";>
                      <PropertyName>USER_</PropertyName>
                      <Literal>TEST\allu</Literal>
                   </PropertyIsEqualTo>
                </ogc:Filter>
 
The SQL generated by Geoserver returns features after I have turned on 
PostgreSQLs standard_compliant_strings property and tried them manually in 
pgAdmin. But Geoserver refuses to render them!?

The output in the log file is found below.

The SQL I'm getting works fine when I run it in pgAdmin manually. I get a 
resultset of 3 rows. Seems like something goes wrong afterwards that makes 
Geoserver unwilling to render them on the image.

Does Geoserver make another match against the literal later on in the process?

> It seems like the filter never matches anything even though I see rows
> in the PostGIS having the field USER_ set to TEST\allu. I can see in
> the geoserver log that the SQL is built correctly and returns features
> when I try it in PostGIS manually, but in a WMS request it never
> results in any points on the map.
>
> If I remove the filter or change the PropertyName and Literal to a
> field and value without backslash it works!
>
> The SLD document is validating and looks like this:
>
> <StyledLayerDescriptor xmlns:ogc="http://www.opengis.net/ogc";
> xmlns:gml="http://www.opengis.net/gml";
>                        xmlns="http://www.opengis.net/sld";
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>                        version="1.0.0"
>                        xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd";>
> <NamedLayer>
>       <Name>sydbs:TEST_PT</Name>
>       <UserStyle>
>          <FeatureTypeStyle>
>             <Rule>
>                <ogc:Filter>
>                   <PropertyIsEqualTo xmlns="http://www.opengis.net/ogc";>
>                      <PropertyName>USER_</PropertyName>
>                      <Literal>TEST\allu</Literal>
>                   </PropertyIsEqualTo>
>                </ogc:Filter>
>                <PointSymbolizer>
>                   <Graphic>
>                      <Mark>
>                         <WellKnownName>circle</WellKnownName>
>                         <Fill>
>                            <CssParameter
> name="fill">#FF0000</CssParameter>
>                         </Fill>
>                         <Stroke>
>                            <CssParameter
> name="stroke">#000000</CssParameter>
>                         </Stroke>
>                      </Mark>
>                      <Size>5</Size>
>                   </Graphic>
>                </PointSymbolizer>
>             </Rule>
>          </FeatureTypeStyle>
>       </UserStyle>
>    </NamedLayer>
> </StyledLayerDescriptor>
>

The output from the log file is:

2008-05-28 15:33:12,325 DEBUG [org.geotools.rendering] - processing 1 stylers 
for TEST_PT
2008-05-28 15:33:12,325 DEBUG [org.geotools.rendering] - creating rules for 
scale denominator - 7 142,857
2008-05-28 15:33:12,325 DEBUG [org.geotools.rendering] - Expanding rendering 
area by 5 pixels to consider stroke width
2008-05-28 15:33:12,325 DEBUG [org.geotools.rendering] - Querying layer TEST_PT 
with bbox: ReferencedEnvelope[1440618.0 : 1441638.0, 6302315.0 : 6303335.0]
2008-05-28 15:33:12,325 DEBUG [org.geotools.data.jdbc] - calling sql builder 
with filter [[Filter.INCLUDE AND Filter.INCLUDE] AND [[ geom bbox POLYGON 
((1440618 6302315, 1440618 6303335, 1441638 6303335, 1441638 6302315, 1440618 
6302315)) ] AND [ USER_ = TEST\allu ]]]
2008-05-28 15:33:12,325 TRACE [org.geotools.core] - ENTRY 2
2008-05-28 15:33:12,325 TRACE [org.geotools.core] - ENTRY 2
2008-05-28 15:33:12,325 TRACE [org.geotools.core] - ENTRY 12 345
2008-05-28 15:33:12,325 TRACE [org.geotools.core] - ENTRY 12 345
2008-05-28 15:33:12,325 TRACE [org.geotools.core] - ENTRY 2
2008-05-28 15:33:12,325 TRACE [org.geotools.core] - ENTRY 4
2008-05-28 15:33:12,325 TRACE [org.geotools.core] - ENTRY 14
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting LogicFilter
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting LogicFilter
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting LogicFilter
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting GeometryFilter
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting 
ExpressionAttribute
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting 
LiteralExpression
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting SQL 
ComparisonFilter
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - Filter type id is 14
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - Filter type text is =
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting 
ExpressionAttribute
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting 
LiteralExpression
2008-05-28 15:33:12,325 DEBUG [org.geotools.filter] - exporting 
LiteralExpression
2008-05-28 15:33:12,325 DEBUG [org.geotools.data.jdbc] - sql is SELECT "oid", 
"USER_", encode(asBinary(force_2d("geom"),'XDR'),'base64') FROM 
"business"."TEST_PT" WHERE ((TRUE AND TRUE) AND ("geom" && 
GeometryFromText('POLYGON ((1440618 6302315, 1440618 6303335, 1441638 6303335, 
1441638 6302315, 1440618 6302315))', 2400) AND "USER_" = 'TEST\allu'))
2008-05-28 15:33:12,325 DEBUG [org.geotools.data.jdbc] - SELECT "oid", "USER_", 
encode(asBinary(force_2d("geom"),'XDR'),'base64') FROM "business"."TEST_PT" 
WHERE ((TRUE AND TRUE) AND ("geom" && GeometryFromText('POLYGON ((1440618 
6302315, 1440618 6303335, 1441638 6303335, 1441638 6302315, 1440618 6302315))', 
2400) AND "USER_" = 'TEST\allu'))
2008-05-28 15:33:12,325 DEBUG [org.geotools.data.jdbc] - About to execute 
query: SELECT "oid", "USER_", encode(asBinary(force_2d("geom"),'XDR'),'base64') 
FROM "business"."TEST_PT" WHERE ((TRUE AND TRUE) AND ("geom" && 
GeometryFromText('POLYGON ((1440618 6302315, 1440618 6303335, 1441638 6303335, 
1441638 6302315, 1440618 6302315))', 2400) AND "USER_" = 'TEST\allu'))
2008-05-28 15:33:12,340 DEBUG [org.geotools.rendering] - Style cache hit ratio: 
NaN , hits 0, requests 0




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to