<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>Hi all,<br>I have just got to grips with basic SLD templates. Now I would like to apply an SLD template and include an SQL condition in it. Im not sure exactly how, or if its possible.<br>I would like to follow a simple Attribute-based point example where point size is set on a less than or equal basis. e.g.<br>&nbsp;&lt;Rule&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ogc:Filter&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ogc:PropertyIsLessThan&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ogc:PropertyName&gt;pop&lt;/ogc:PropertyName&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ogc:Literal&gt;50000&lt;/ogc:Literal&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ogc:PropertyIsLessThan&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 &lt;/ogc:Filter&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .....<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Rule&gt;<br>&nbsp;<br>In my case, I do not have a property such as population, rather I would like to have the point size set depending on the count of attributes with a specific value (the value is actually location, so the more points with the same (lat,lon) the bigger I would like to have the symbol at that point drawn)<br><br>In other words, I am trying to do something like this:<br>&nbsp;&lt;Rule&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ogc:Filter&gt;<br><br>SELECT DISTINCT ( COUNT( point_geom))<br>&nbsp; FROM (SELECT point_geom&nbsp; FROM locations where point_type = 3) AS foo<br>GROUP BY point_geom;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if count result = 3, then use a point of diameter
 3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if count result = 4, then use a point of diameter 4<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ogc:Filter&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .....<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Rule&gt;<br><br>Does anyone have any hints on how to go about this?<br>Many thanks,<br><br>Eoin.</td></tr></table><br>