i have created 1km radius buffer within that buffer few school points will come.how to highlight those points and how to retrieve that school data from database am using postgresql for db connection.
1 Answer
When you buffer points, you style them using PolygonSymbolizer and not PointSymbolizer. Here is a sample SLD file which buffers points that are read from a shapefile. The geographies are named the_geom
. Buffering is done by a factor of 0.8 (degrees, I think):
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Buffered Points</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Geometry>
<ogc:Function name="buffer">
<ogc:PropertyName>the_geom</ogc:PropertyName>
<ogc:Literal>0.8</ogc:Literal>
</ogc:Function>
</Geometry>
<Fill>
<CssParameter name="fill">#7E8F7C</CssParameter>
<CssParameter name="fill-opacity">0.3</CssParameter>
</Fill>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>