Hi GS users,
I just noticed that there is an error or possibly a bug in sld:pointSymbolizer. I used the following sld file:
""
<sld:FeatureTypeStyle>
<sld:Name>name</sld:Name>
<sld:Rule>
<sld:Name> Low XX </sld:Name>
<sld:Title>Low XX</sld:Title>
<ogc:Filter>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>var1</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
<sld:PointSymbolizer>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>circle</sld:WellKnownName>
<sld:Fill>
<sld:CssParameter name="fill">#0EF078</sld:CssParameter>
<sld:CssParameter name="fill-opacity">0.5</sld:CssParameter>
</sld:Fill>
<sld:Stroke/>
</sld:Mark>
<sld:Size>
<ogc:Literal>6</ogc:Literal>
</sld:Size>
</sld:Graphic>
</sld:PointSymbolizer>
</sld:Rule>
<sld:Rule>
<sld:Name> High XX </sld:Name>
<sld:Title>High XX</sld:Title>
<ogc:Filter>
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyName>var1</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
</ogc:Filter>
<sld:PointSymbolizer>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>circle</sld:WellKnownName>
<sld:Fill>
<sld:CssParameter name="fill">#F30909</sld:CssParameter>
</sld:Fill>
<sld:Stroke>
<sld:CssParameter name="stroke-opacity">0.67</sld:CssParameter>
</sld:Stroke>
</sld:Mark>
<sld:Size>
<ogc:Literal>6</ogc:Literal>
</sld:Size>
</sld:Graphic>
</sld:PointSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
""
I want all the points with var1>=10 to be rendered using the High XX rule. But what I noticed is that all the points where the first digit of var1 is greater than 1 are grouped and colored as High XX. For example a point with var1=5 is rendered as High XX. I also checked the geoext styler and the result is the same. So I think this should be a bug.
Has anybody else encountered this problem?
Thanks,
Manouchehr
On Wed, Aug 31, 2011 at 3:43 PM, Amini, Manouchehr
<Manouchehr.Amini@anonymised.com> wrote:
Hi GS users,
I just noticed that there is an error or possibly a bug in sld:pointSymbolizer. I used the following sld file:
""
<sld:FeatureTypeStyle>
<sld:Name>name</sld:Name>
<sld:Rule>
<sld:Name> Low XX </sld:Name>
<sld:Title>Low XX</sld:Title>
<ogc:Filter>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>var1</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
<sld:PointSymbolizer>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>circle</sld:WellKnownName>
<sld:Fill>
<sld:CssParameter name="fill">#0EF078</sld:CssParameter>
<sld:CssParameter name="fill-opacity">0.5</sld:CssParameter>
</sld:Fill>
<sld:Stroke/>
</sld:Mark>
<sld:Size>
<ogc:Literal>6</ogc:Literal>
</sld:Size>
</sld:Graphic>
</sld:PointSymbolizer>
</sld:Rule>
<sld:Rule>
<sld:Name> High XX </sld:Name>
<sld:Title>High XX</sld:Title>
<ogc:Filter>
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyName>var1</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
</ogc:Filter>
<sld:PointSymbolizer>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>circle</sld:WellKnownName>
<sld:Fill>
<sld:CssParameter name="fill">#F30909</sld:CssParameter>
</sld:Fill>
<sld:Stroke>
<sld:CssParameter name="stroke-opacity">0.67</sld:CssParameter>
</sld:Stroke>
</sld:Mark>
<sld:Size>
<ogc:Literal>6</ogc:Literal>
</sld:Size>
</sld:Graphic>
</sld:PointSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
""
I want all the points with var1>=10 to be rendered using the High XX rule. But what I noticed is that all the points where the first digit of var1 is greater than 1 are grouped and colored as High XX. For example a point with var1=5 is rendered as High XX. I also checked the geoext styler and the result is the same. So I think this should be a bug.
Has anybody else encountered this problem?
Sounds like a data type problem, the behavior you see is compatible
with text based comparison
instead of numeric comparison.
Is the data stored in a database? If so, is var1 a text column?
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------
Dear Andrea,
Thanks for the hint. Yes it was a data type problem.
Best,
Manouchehr
-----Original Message-----
From: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] On Behalf Of Andrea Aime
Sent: Sonntag, 4. September 2011 14:34
To: Amini, Manouchehr
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: sld:pointSymbolizer error/bug
On Wed, Aug 31, 2011 at 3:43 PM, Amini, Manouchehr <Manouchehr.Amini@anonymised.com8...> wrote:
Hi GS users,
I just noticed that there is an error or possibly a bug in sld:pointSymbolizer. I used the following sld file:
""
<sld:FeatureTypeStyle>
<sld:Name>name</sld:Name>
<sld:Rule>
<sld:Name> Low XX </sld:Name>
<sld:Title>Low XX</sld:Title>
<ogc:Filter>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>var1</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
<sld:PointSymbolizer>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>circle</sld:WellKnownName>
<sld:Fill>
<sld:CssParameter
name="fill">#0EF078</sld:CssParameter>
<sld:CssParameter
name="fill-opacity">0.5</sld:CssParameter>
</sld:Fill>
<sld:Stroke/>
</sld:Mark>
<sld:Size>
<ogc:Literal>6</ogc:Literal>
</sld:Size>
</sld:Graphic>
</sld:PointSymbolizer>
</sld:Rule>
<sld:Rule>
<sld:Name> High XX </sld:Name>
<sld:Title>High XX</sld:Title>
<ogc:Filter>
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyName>var1</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
</ogc:Filter>
<sld:PointSymbolizer>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>circle</sld:WellKnownName>
<sld:Fill>
<sld:CssParameter
name="fill">#F30909</sld:CssParameter>
</sld:Fill>
<sld:Stroke>
<sld:CssParameter
name="stroke-opacity">0.67</sld:CssParameter>
</sld:Stroke>
</sld:Mark>
<sld:Size>
<ogc:Literal>6</ogc:Literal>
</sld:Size>
</sld:Graphic>
</sld:PointSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
""
I want all the points with var1>=10 to be rendered using the High XX rule. But what I noticed is that all the points where the first digit of var1 is greater than 1 are grouped and colored as High XX. For example a point with var1=5 is rendered as High XX. I also checked the geoext styler and the result is the same. So I think this should be a bug.
Has anybody else encountered this problem?
Sounds like a data type problem, the behavior you see is compatible with text based comparison instead of numeric comparison.
Is the data stored in a database? If so, is var1 a text column?
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------