I'm using GS 1.4 and had the same problem. From what I understand (I'm a
'user', not a developer) when the literal looks at the lieteral and
determines on it's own if it is char or numeric, without looking at the
datatype in the db. I was told this would be fixed for 1.6....they may just
not have gotten to it yet.
My workaround was to make a new column with a leading 'z' so it wouldn't be
fooled.
Steve
Stephen Crawford
Center for Environmental Informatics
The Pennsylvania State University
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Banks,
Nathan
Sent: Friday, September 14, 2007 1:34 PM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] SLD Filter problem
Hi,
I am trying to apply an SLD filter to a feature based on a specific field.
The field in question, 'rte', contains values such as 001, 002, 010, 100,
etc. and is defined in the database (Postgres/PostGIS) as a varchar. My SLD
filter does not seem to work for any record that has a leading zero in the
'rte' field. Is there something wrong with my syntax? Here are a couple of
examples.
This does not work:
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rte</ogc:PropertyName>
<ogc:Literal>004</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
But this does work:
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rte</ogc:PropertyName>
<ogc:Literal>110</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
My Geoserver version is 1.6.0 b1.
Regards,
Nathan
Nathan Banks
Portland, Oregon
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
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