Hello!

Geoserver 2.15.2

I need to create a style with arrows on the start and end points of the line
with orientation of the corresponding segment of the line. I took a TTF
wingdings 3 symbol and used startPoint, endPoint, startAngle and endAngle
functions to render points and make rotation. Here's my style:

<?xml version="1.0" encoding="UTF-8"?>

<sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld";
xmlns:sld="http://www.opengis.net/sld";
xmlns:gml="http://www.opengis.net/gml";
xmlns:ogc="http://www.opengis.net/ogc"; version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>line</sld:Name>
    <sld:UserStyle>
      <sld:Name>ЛЭП высокого напряжения</sld:Name>
      <sld:FeatureTypeStyle>
        <sld:Name>GEO_HVL</sld:Name>
        <sld:Rule>
          <sld:Name>ЛЭП высокого напряжения</sld:Name>
          <sld:LineSymbolizer>
           <sld:Stroke>
             <sld:CssParameter name="stroke">#FF0000</sld:CssParameter>
           </sld:Stroke>
          </sld:LineSymbolizer>
          <sld:PointSymbolizer>
            <Geometry>
               <ogc:Function name="endPoint">
                  <ogc:PropertyName>geometry</ogc:PropertyName>
               </ogc:Function>
            </Geometry>
            <sld:Graphic>
              <sld:Mark>
                <sld:WellKnownName>ttf://Wingdings
3#U+F068</sld:WellKnownName>
                <sld:Fill>
                  <sld:CssParameter name="fill">#FF0000</sld:CssParameter>
                </sld:Fill>
              </sld:Mark>
              <sld:AnchorPoint>
                <sld:AnchorPointX>0.5</sld:AnchorPointX>
                <sld:AnchorPointY>0</sld:AnchorPointY>
              </sld:AnchorPoint>
               <sld:Rotation>
                 <ogc:Function name="endAngle">
                  <ogc:PropertyName>geometry</ogc:PropertyName>
               </ogc:Function>
                  </sld:Rotation>
              <sld:Size>30.0</sld:Size>
            </sld:Graphic>
          </sld:PointSymbolizer>
          <sld:PointSymbolizer>
            <Geometry>
               <ogc:Function name="startPoint">
                  <ogc:PropertyName>geometry</ogc:PropertyName>
               </ogc:Function>
            </Geometry>
            <sld:Graphic>
              <sld:Mark>
                <sld:WellKnownName>ttf://Wingdings
3#U+F068</sld:WellKnownName>
                <sld:Fill>
                  <sld:CssParameter name="fill">#FF0000</sld:CssParameter>
                </sld:Fill>
              </sld:Mark>
              <sld:AnchorPoint>
                <sld:AnchorPointX>0.5</sld:AnchorPointX>
                <sld:AnchorPointY>0</sld:AnchorPointY>
              </sld:AnchorPoint>
               <sld:Rotation>
                 <ogc:Function name="startAngle">
                  <ogc:PropertyName>geometry</ogc:PropertyName>
               </ogc:Function>
                  </sld:Rotation>
              <sld:Size>30.0</sld:Size>
            </sld:Graphic>
          </sld:PointSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

I expected the arrows to be oriented on the line segments but here's what
I've got:
<http://osgeo-org.1560.x6.nabble.com/file/t385725/Capture.png> 

I wondered if turning the arrows 90 degrees CW and CCW would solve the
problem...but no:
<http://osgeo-org.1560.x6.nabble.com/file/t385725/Capture2.png> 

Different behaviour on different objects. 

What am I doing wrong?




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to