Hi Frank et al.

Don't think you read my question :) My needs goes a bit further. I need the 
startingPoint rotation to be rotated 180 degrees from the value returned by:

<Rotation>
                <ogc:Function name="startAngle">
                  <ogc:PropertyName>the_geom</ogc:PropertyName>
                </ogc:Function>
</Rotation>

Both the arrows must point away from the line. In your / Andrea SLD both the 
arrows points the same way, like the picture below.

Can I add or subtract 180 degrees to:

<Rotation>
                <ogc:Function name="startAngle">
                  <ogc:PropertyName>the_geom</ogc:PropertyName>
                </ogc:Function>
</Rotation>
So I need to flip the arrow of the starting point 180 degrees in the (red 
circke)
[cid:[email protected]]

Thanks,
Jakob

From: [email protected] [mailto:[email protected]] On 
Behalf Of Frank Gasdorf
Sent: Friday, March 30, 2012 12:04 PM
To: Jakob Lanstorp
Cc: [email protected]
Subject: Re: [Geoserver-users] SLD Rotate a symbol basen on a expression with 
geom and a constant

Jakob,

two years ago Andrea presented a solution at FOSS4G [1] based on additional 
functions [2]:

 <PointSymbolizer>
            <Geometry>
              <ogc:Function name="endPoint">
                <ogc:PropertyName>the_geom</ogc:PropertyName>
              </ogc:Function>
            </Geometry>
            <Graphic>
              <Mark>
                <WellKnownName>shape://carrow</WellKnownName>
                <Fill />
                <Stroke>
                  <CssParameter name="stroke-width">1</CssParameter>
                  <CssParameter name="stroke">#000000</CssParameter>
                </Stroke>
              </Mark>
              <Size>20</Size>
              <Rotation>
                <ogc:Function name="endAngle">
                  <ogc:PropertyName>the_geom</ogc:PropertyName>
                </ogc:Function>
              </Rotation>
            </Graphic>
          </PointSymbolizer>

Cheers,
Frank

[1] : http://2010.foss4g.org/presentations/3588.pdf
[2] : http://docs.geoserver.org/stable/en/user/filter/function_reference.html

2012/3/30 Jakob Lanstorp <[email protected]<mailto:[email protected]>>
I need to put a closing arrow on both end and start point of a line, like:      
<--------------------->

The arrows need to follow the rotation of the line. I can do this with the end 
point, just using the rotation of the geom. With the startPoint I need to 
rotate it 180 degrees from the line rotation.

Can I have a math expression in the rotation SLD tag adding or subtracting the 
two rotation tags below

1.
              <Rotation>
                <ogc:Function name="startAngle">
                  <ogc:PropertyName>the_geom</ogc:PropertyName>
                </ogc:Function>
              </Rotation>
2.
              <Rotation>180</Rotation>

Complete rule for the startPoint arrow that's need rotation:

 <Rule>
          <PointSymbolizer>
            <Geometry>
              <ogc:Function name="startPoint">
                <ogc:PropertyName>the_geom</ogc:PropertyName>
              </ogc:Function>
            </Geometry>
            <Graphic>
              <Mark>
                <WellKnownName>shape://oarrow</WellKnownName>
                <Fill/>
                <Stroke>
                  <CssParameter name="stroke">#000000</CssParameter>
                </Stroke>
              </Mark>
              <Size>20</Size>
              <Rotation>
                <ogc:Function name="startAngle">
                  <ogc:PropertyName>the_geom</ogc:PropertyName>
                </ogc:Function>
               <!-- need expression to add 180 -->
              </Rotation>
            </Graphic>
          </PointSymbolizer>
</Rule>

Best Regards

Jakob Lanstorp
IT-Consulent
[cid:[email protected]]


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users

<<inline: image002.png>>

<<inline: image003.jpg>>

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to