Hello,
Doesn’t anyone know anything about this?
The main problem is described in my first post. Geoserver doesn’t render my features when I use a filter like this in my SLD (see my first post for the whole document):
ogc:Filter
USER_
TEST\allu
</ogc:Filter>
The SQL (see previous post) 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!?
Is it a bug or am I doing something wrong?
Regards
Albin
Från: geoserver-users-bounces@lists.sourceforge.net [mailto:geoserver-users-bounces@lists.sourceforge.net] För Lundmark Albin
Skickat: den 28 maj 2008 16:06
Till: Justin Deoliveira
Kopia: geoserver-users@lists.sourceforge.net
Ämne: Re: [Geoserver-users] Problem with backslash in SLDwithPropertyIsEqualTo
Hello again,
Thank you for your response!
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?
The PropertyIsLike doesn’t seem to work that great either in this situation. If I substitute the PropertyIsEqualTo with a PropertyIsLike in the SLD-document in my earlier post it matches all objects in the featuretype regardless of the content of the literal.
Any other ideas?
I’m using Geoserver 1.6.4 with hot fix for GEOS-1942. Will update to 1.6.4b soon.
Regards
Albin
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
Från: geoserver-users-bounces@anonymised.com.net [mailto:geoserver-users-bounces@lists.sourceforge.net] För Justin Deoliveira
Skickat: den 20 maj 2008 05:29
Till: Lundmark Albin
Kopia: geoserver-users@lists.sourceforge.net
Ämne: Re: [Geoserver-users] Problem with backslash in SLD withPropertyIsEqualTo
Hi Albin,
It would be helpful if we could see what the SQL is that is getting generated from the SLD. Can you change the logging level to GEOTOOLS_DEVELOPER_LOGGING and reexecute the request, you should see some SQL queries in the log.
Another thing that might work is to change the filter to PropertyIsLike, instead of PropertyIsEqualTo, with a Like, you can specify which is the escape character explicitly.
-Justin
Lundmark Albin wrote:
Hi,
I’m having trouble with backslashes in SLD filters. If I have a filter
on a field with a literal containing a backslash sign () it never
shows any features. See SLD below.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!
Any ideas anyone?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”>
sydbs:TEST_PT
ogc:Filter
USER_
TEST\allu
</ogc:Filter>
circle
#FF0000
#000000
5
All help is appreciated!
Regards
Albin
— 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-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users!DSPAM:4007,483181bc206527082231907!
–
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
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-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
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-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users