Hi Ouke,

If I understand your question correctly, you would like to add a label to the 
start and end of the line that bounds a polygon. There is a geometric filter 
function to extract the start and end points of a line, e.g.:

<Geometry>
    <ogc:Function name="startPoint">
      <ogc:PropertyName>the_geom</ogc:PropertyName>
    </ogc:Function>
</Geometry>

More info to be found here:

http://docs.geoserver.org/latest/en/user/styling/sld-extensions/geometry-transformations.html#start-and-end-point

Also, you indicated that the label should follow the direction of this line. 
For this, another geometric filter function is required, e.g. 

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

Hope that helps!

Kind regards,

Edward



> Date: Fri, 20 Sep 2013 02:31:37 -0700
> From: [email protected]
> To: [email protected]
> Subject: [Geoserver-users] question placing labels
> 
> I would like at the start of a polygon to insert a label, and at the end of
> the polygon. how can I fix this in geoserver. up to now the geoserver places
> it on any position above or below the polygon. by the way the labels are
> different and they must be in the direction of the polygon.
> 
> 
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/question-placing-labels-tp5078826.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
                                          
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to