Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have published a point layer in Geoserver, which is the data from a GPS Survey. In addition to the geometry, my layer, also contains an Attribute for Accuracy, which indicates the Accuracy in meters of the reading.

I have been trying to style the layer, such that a point is show as a point surrounded by a circle whose radius is equivalent to the Accuracy in map units. (Similar to how most mobile apps show the GPS points)

All of the Attribute based symbolization that I have seen is Rule based (i.e. Classification).

How do you Symbolize a point, such that its radius is equal to its accuracy?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Try an SLD like this, using ogc:PropertyName to include the accuracy value:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" 
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" 
    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">
  <NamedLayer>
    <Name>Attribute-based point</Name>
    <UserStyle>
      <FeatureTypeStyle>
        <Rule>
          <PointSymbolizer uom="http://www.opengeospatial.org/se/units/metre">
            <Graphic>
              <Mark>
                <WellKnownName>circle</WellKnownName>
                <Fill>
                  <CssParameter name="fill">#0033CC</CssParameter>
                  <CssParameter name="fill-opacity">0.1</CssParameter>
                </Fill>
              </Mark>
              <Size><ogc:PropertyName>Accuracy</ogc:PropertyName></Size>
            </Graphic>
          </PointSymbolizer>
          </PointSymbolizer>
            <PointSymbolizer>
             <Graphic>
               <Mark>
                <WellKnownName>circle</WellKnownName>
                 <Fill>
                  <CssParameter name="fill">#f00000</CssParameter>
                  <CssParameter name="fill-opacity">1.0</CssParameter>
                 </Fill>
               </Mark>
               <Size>7</Size>
               </Graphic>
            </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>
share|improve this answer
    
After using uom="opengeospatial.org/se/units/metre"; for using Ground units, you sld work perfectly. –  Devdatta Tengshe Feb 5 '13 at 3:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.