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.

Geoserver 2.1.3

I would like to symbolize a line with a Square but use the <Rotation>45</Rotation> tags to make the symbol look like a diamond.

My sld is below and unfortunately the symbols are not rotated...Is this not possible or is my SLD wrong?

thanks,

Rob

<?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>line-symbol rotation</Name>
    <UserStyle>
      <Title>line-symbol rotation</Title>      
      <FeatureTypeStyle>        
        <Rule>      
          <Name>line-symbol rotation</Name>                          
          <LineSymbolizer >    
            <Stroke>
              <GraphicStroke>
                <Graphic>
           <Mark>
             <WellKnownName>square</WellKnownName>
             <Fill>
               <CssParameter name="fill">#009900</CssParameter>
             </Fill>
           </Mark>
           <Size>12</Size>
           <Rotation>45</Rotation>
         </Graphic>           
              </GraphicStroke>              
            </Stroke>
          </LineSymbolizer>                 
        </Rule>        
      </FeatureTypeStyle>         
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>
share|improve this question
    
This style with geometries can be seen here:maps.zgb.de/geoserver/zgb/… –  Robert Buckley Apr 10 '12 at 11:14

1 Answer 1

up vote 1 down vote accepted

I'm not sure the linestroke will support rotation but why not take the diamond from wingdings:

<Graphic>
          <Mark>
            <WellKnownName>ttf://Wingdings#117</WellKnownName>
            <Fill>
              <CssParameter
                name="fill">#000000</CssParameter>
            </Fill>
          </Mark>
          <Opacity>1</Opacity>
          <Size>18</Size>
        </Graphic>

Did you see this presentation: http://demo.geo-solutions.it/share/foss4g2011/gs_styling_aaime_foss4g2011.pdf

share|improve this answer

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.